File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Sources/StreamChatSwiftUI/ChatChannel/Gallery Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
5
5
6
6
### ✅ Added
7
7
- Possibility to add a custom view above the oldest message in a group
8
+ - Swipe gesture to dismiss image gallery
8
9
9
10
### 🐞 Fixed
10
11
- Memory cache trimming on chat dismiss
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ import SwiftUI
8
8
/// View used for displaying image attachments in a gallery.
9
9
struct GalleryView : View {
10
10
11
+ @Environment ( \. presentationMode) var presentationMode
12
+
11
13
@Injected ( \. colors) private var colors
12
14
@Injected ( \. fonts) private var fonts
13
15
@Injected ( \. images) private var images
@@ -66,6 +68,13 @@ struct GalleryView: View {
66
68
}
67
69
. tabViewStyle ( . page( indexDisplayMode: . never) )
68
70
. background ( Color ( colors. background1) )
71
+ . gesture (
72
+ DragGesture ( ) . onEnded { value in
73
+ if value. location. y - value. startLocation. y > 100 {
74
+ presentationMode. wrappedValue. dismiss ( )
75
+ }
76
+ }
77
+ )
69
78
70
79
HStack {
71
80
ShareButtonView ( content: sharingContent)
You can’t perform that action at this time.
0 commit comments