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/).
55
66### ✅ Added
77- Possibility to add a custom view above the oldest message in a group
8+ - Swipe gesture to dismiss image gallery
89
910### 🐞 Fixed
1011- Memory cache trimming on chat dismiss
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ import SwiftUI
88/// View used for displaying image attachments in a gallery.
99struct GalleryView : View {
1010
11+ @Environment ( \. presentationMode) var presentationMode
12+
1113 @Injected ( \. colors) private var colors
1214 @Injected ( \. fonts) private var fonts
1315 @Injected ( \. images) private var images
@@ -66,6 +68,13 @@ struct GalleryView: View {
6668 }
6769 . tabViewStyle ( . page( indexDisplayMode: . never) )
6870 . 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+ )
6978
7079 HStack {
7180 ShareButtonView ( content: sharingContent)
You can’t perform that action at this time.
0 commit comments