expo-simple-gallery 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,7 @@ final class ExpoSimpleGalleryView: ExpoView, ContextMenuActionsDelegate {
14
14
  let onSectionHeadersVisible = EventDispatcher()
15
15
  let onPreviewMenuOptionSelected = EventDispatcher()
16
16
 
17
+ @MainActor
17
18
  required init(appContext: AppContext? = nil) {
18
19
  super.init(appContext: appContext)
19
20
  galleryView = GalleryGridView(
@@ -29,14 +30,17 @@ final class ExpoSimpleGalleryView: ExpoView, ContextMenuActionsDelegate {
29
30
  galleryView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
30
31
  }
31
32
 
33
+ @MainActor
32
34
  func callSuperMountChildComponentView(_ childComponentView: UIView, index: Int) {
33
35
  super.mountChildComponentView(childComponentView, index: index)
34
36
  }
35
37
 
38
+ @MainActor
36
39
  func callSuperUnmountChildComponentView(_ childComponentView: UIView, index: Int) {
37
40
  super.unmountChildComponentView(childComponentView, index: index)
38
41
  }
39
42
 
43
+ @MainActor
40
44
  override func mountChildComponentView(_ childComponentView: UIView, index: Int) {
41
45
  // DispatchQueue.main.async { [weak self] in
42
46
  // guard let self else { return }
@@ -75,6 +79,7 @@ final class ExpoSimpleGalleryView: ExpoView, ContextMenuActionsDelegate {
75
79
  // }
76
80
  }
77
81
 
82
+ @MainActor
78
83
  override func unmountChildComponentView(_ childComponentView: UIView, index: Int) {
79
84
  let component = ReactMountingComponent(view: childComponentView, index: index)
80
85
  self.unmount(overlay: component)
@@ -92,6 +97,7 @@ final class ExpoSimpleGalleryView: ExpoView, ContextMenuActionsDelegate {
92
97
  }
93
98
  }
94
99
 
100
+ @MainActor
95
101
  deinit {
96
102
  // Clean up all visible containers
97
103
  galleryView?.visibleCells().forEach { cell in
@@ -112,6 +118,7 @@ final class ExpoSimpleGalleryView: ExpoView, ContextMenuActionsDelegate {
112
118
  }
113
119
  }
114
120
 
121
+ @MainActor
115
122
  extension ExpoSimpleGalleryView: GestureEventDelegate {
116
123
  func galleryGrid(_ gallery: GalleryGridView, didPressCell cell: PressedCell) {
117
124
  onThumbnailPress(cell.dict())
@@ -126,6 +133,7 @@ extension ExpoSimpleGalleryView: GestureEventDelegate {
126
133
  }
127
134
  }
128
135
 
136
+ @MainActor
129
137
  extension ExpoSimpleGalleryView: OverlayPreloadingDelegate {
130
138
  func galleryGrid(_ gallery: GalleryGridView, prefetchOverlaysFor range: (Int, Int)) {
131
139
  onOverlayPreloadRequested(["range": [range.0, range.1]])
@@ -139,6 +147,7 @@ extension ExpoSimpleGalleryView: OverlayPreloadingDelegate {
139
147
  }
140
148
 
141
149
  // MARK: - Overlay Mounting Implementation
150
+ @MainActor
142
151
  extension ExpoSimpleGalleryView: OverlayMountingDelegate {
143
152
  func mount<T: OverlayContainer>(to container: T) {
144
153
  guard let containerId = container.containerIdentifier else { return }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-simple-gallery",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Image gallery view",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",