Commit d8ffa0a
authored
fix: UIDevice.current.orientation.isLandscape not main thread access (#102)
Move access to UIDevice.current.orientation.isLandscape onto main thread
access
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Capture orientation on the main thread and propagate it through the
image/export pipeline to viewport events, removing direct UIDevice
orientation access.
>
> - **Session Replay Pipeline**:
> - Capture device orientation on the main thread in
`ScreenCaptureService.captureUIImage` and include it in `CapturedImage`.
> - Propagate orientation through `UIImage.exportImage(...)` and
`ExportImage` (new `orientation` field/initializer parameter).
> - `SessionReplayEventGenerator.viewPortEvent` now uses
`exportImage.orientation` instead of querying `UIDevice`.
> - `SnapshotTaker` passes `CapturedImage.orientation` when creating
`ExportImage`.
> - **Misc**:
> - Record `timestamp` once in `ScreenCaptureService` and reuse for the
captured frame.
> - Test app config: minor cleanup in `Observability` options.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
0728cca. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 0a531f5 commit d8ffa0a
File tree
4 files changed
+20
-13
lines changed- Sources/LaunchDarklySessionReplay
- Exporter
- ScreenCapture
4 files changed
+20
-13
lines changedLines changed: 1 addition & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | 223 | | |
229 | 224 | | |
230 | 225 | | |
231 | 226 | | |
232 | 227 | | |
233 | 228 | | |
234 | | - | |
| 229 | + | |
235 | 230 | | |
236 | 231 | | |
237 | 232 | | |
| |||
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
54 | | - | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
61 | | - | |
| 63 | + | |
| 64 | + | |
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
| |||
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
25 | 32 | | |
26 | 33 | | |
27 | 34 | | |
| |||
69 | 76 | | |
70 | 77 | | |
71 | 78 | | |
72 | | - | |
| 79 | + | |
| 80 | + | |
73 | 81 | | |
74 | 82 | | |
75 | 83 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
| 102 | + | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| |||
0 commit comments