Skip to content

Commit 3e138c8

Browse files
committed
WIP
1 parent 5579173 commit 3e138c8

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Modules/Sources/ArticleFeature/Views/ArticleElementView.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,10 @@ struct ArticleElementView: View {
121121
}
122122
.fullScreenCover(isPresented: $showFullScreenImage) {
123123
if #available(iOS 16.4, *) {
124-
// FullScreenImage(element: element, showFullScreen: $showFullScreenImage)
125-
// .presentationBackground(.clear)
126124
TabViewGallery(gallery: [element], showScreenGallery: $showFullScreenImage, selectedImageID: $selectedImageID)
127125
.presentationBackground(.clear)
128126
} else {
129-
// Fallback on earlier versions
127+
TabViewGallery(gallery: [element], showScreenGallery: $showFullScreenImage, selectedImageID: $selectedImageID)
130128
}
131129
}
132130
}
@@ -167,7 +165,7 @@ struct ArticleElementView: View {
167165
TabViewGallery(gallery: element, showScreenGallery: $showFullScreenGallery, selectedImageID: $selectedImageID)
168166
.presentationBackground(.clear)
169167
} else {
170-
// Fallback on earlier versions
168+
TabViewGallery(gallery: element, showScreenGallery: $showFullScreenGallery, selectedImageID: $selectedImageID)
171169
}
172170
}
173171
}

Modules/Sources/ArticleFeature/Views/Gallery/CustomScrollView.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ struct CustomScrollView: UIViewRepresentable {
153153
return false
154154
}
155155

156+
if parent.imageElement.count == 1 {
157+
firstSwipeDirection = .vertical
158+
return true
159+
}
160+
156161
if let panGesture = gestureRecognizer as? UIPanGestureRecognizer {
157162
let velocity = panGesture.velocity(in: panGesture.view)
158163
if firstSwipeDirection == .none {
@@ -167,6 +172,7 @@ struct CustomScrollView: UIViewRepresentable {
167172
}
168173
}
169174
}
175+
170176
return true
171177
}
172178
}

0 commit comments

Comments
 (0)