mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 23:18:27 +02:00
removed DBSheet library
and improved location sharing viewer to support the same behaviour but only from iOS 16.4
This commit is contained in:
1
Podfile
1
Podfile
@@ -24,7 +24,6 @@ end
|
||||
|
||||
def import_SwiftUI_pods
|
||||
pod 'Introspect', '~> 0.1'
|
||||
pod 'DSBottomSheet', '~> 0.3'
|
||||
pod 'ZXingObjC', '~> 3.6.9'
|
||||
end
|
||||
|
||||
|
||||
10
Podfile.lock
10
Podfile.lock
@@ -18,7 +18,6 @@ PODS:
|
||||
- BlueECC (1.2.5)
|
||||
- BlueRSA (1.0.200)
|
||||
- Down (0.11.0)
|
||||
- DSBottomSheet (0.3.0)
|
||||
- DSWaveformImage (6.1.1)
|
||||
- FLEX (5.22.10)
|
||||
- FlowCommoniOS (1.12.2)
|
||||
@@ -86,7 +85,6 @@ PODS:
|
||||
|
||||
DEPENDENCIES:
|
||||
- Down (~> 0.11.0)
|
||||
- DSBottomSheet (~> 0.3)
|
||||
- DSWaveformImage (~> 6.1.1)
|
||||
- FLEX (~> 5.22.10)
|
||||
- FlowCommoniOS (~> 1.12.0)
|
||||
@@ -119,7 +117,6 @@ SPEC REPOS:
|
||||
- BlueECC
|
||||
- BlueRSA
|
||||
- Down
|
||||
- DSBottomSheet
|
||||
- DSWaveformImage
|
||||
- FLEX
|
||||
- FlowCommoniOS
|
||||
@@ -163,7 +160,6 @@ SPEC CHECKSUMS:
|
||||
BlueECC: 0d18e93347d3ec6d41416de21c1ffa4d4cd3c2cc
|
||||
BlueRSA: dfeef51db96bcc4edec654956c1581adbda4e6a3
|
||||
Down: b6ba1bc985c9d2f4e15e3b293d2207766fa12612
|
||||
DSBottomSheet: ca0ac37eb5af2dd54663f86b84382ed90a59be2a
|
||||
DSWaveformImage: 3c718a0cf99291887ee70d1d0c18d80101d3d9ce
|
||||
FLEX: f21ee4f498eed3f8a1eded66b21939fd3b7a22ce
|
||||
FlowCommoniOS: ca92071ab526dc89905495a37844fd7e78d1a7f2
|
||||
@@ -179,7 +175,7 @@ SPEC CHECKSUMS:
|
||||
libPhoneNumber-iOS: 0a32a9525cf8744fe02c5206eb30d571e38f7d75
|
||||
LoggerAPI: ad9c4a6f1e32f518fdb43a1347ac14d765ab5e3d
|
||||
Logging: beeb016c9c80cf77042d62e83495816847ef108b
|
||||
MatrixSDK: e3096b0b47f8a0bde6ae3f614f9c49e7e92b03ea
|
||||
MatrixSDK: 33d348122df228efa234d7b353c33620fc420a59
|
||||
MatrixSDKCrypto: 27bee960e0e8b3a3039f3f3e93dd2ec88299c77e
|
||||
ReadMoreTextView: 19147adf93abce6d7271e14031a00303fe28720d
|
||||
Realm: 9ca328bd7e700cc19703799785e37f77d1a130f2
|
||||
@@ -198,6 +194,6 @@ SPEC CHECKSUMS:
|
||||
zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c
|
||||
ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5
|
||||
|
||||
PODFILE CHECKSUM: 9148246fffa2c32e3c9b29a51cae4bb037497056
|
||||
PODFILE CHECKSUM: 50ea16fe614e202ee198f2378d85dca5b2cf21a8
|
||||
|
||||
COCOAPODS: 1.14.3
|
||||
COCOAPODS: 1.15.2
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
import DSBottomSheet
|
||||
import SwiftUI
|
||||
|
||||
struct LiveLocationSharingViewer: View {
|
||||
@@ -16,9 +15,7 @@ struct LiveLocationSharingViewer: View {
|
||||
@Environment(\.theme) private var theme: ThemeSwiftUI
|
||||
|
||||
@Environment(\.openURL) var openURL
|
||||
|
||||
@State private var isBottomSheetExpanded = false
|
||||
|
||||
|
||||
var bottomSheetCollapsedHeight: CGFloat = 150.0
|
||||
|
||||
// MARK: Public
|
||||
@@ -111,7 +108,19 @@ struct LiveLocationSharingViewer: View {
|
||||
}
|
||||
.accentColor(theme.colors.accent)
|
||||
.background(theme.colors.system.ignoresSafeArea())
|
||||
.bottomSheet(sheet, if: viewModel.viewState.isBottomSheetVisible)
|
||||
.sheet(isPresented: .constant(viewModel.viewState.isBottomSheetVisible)) {
|
||||
if #available(iOS 16.4, *) {
|
||||
userLocationList
|
||||
.presentationBackgroundInteraction(.enabled)
|
||||
.presentationBackground(theme.colors.background)
|
||||
.presentationDragIndicator(.visible)
|
||||
.presentationDetents([.height(bottomSheetCollapsedHeight), .large])
|
||||
.interactiveDismissDisabled()
|
||||
} else {
|
||||
userLocationList
|
||||
.interactiveDismissDisabled()
|
||||
}
|
||||
}
|
||||
.actionSheet(isPresented: $viewModel.showMapCreditsSheet) {
|
||||
MapCreditsActionSheet(openURL: { url in
|
||||
openURL(url)
|
||||
@@ -130,8 +139,6 @@ struct LiveLocationSharingViewer: View {
|
||||
LiveLocationListItem(viewData: viewData, onStopSharingAction: {
|
||||
viewModel.send(viewAction: .stopSharing)
|
||||
}, onBackgroundTap: { userId in
|
||||
// Push bottom sheet down on item tap
|
||||
isBottomSheetExpanded = false
|
||||
viewModel.send(viewAction: .tapListItem(userId))
|
||||
})
|
||||
}
|
||||
@@ -142,34 +149,6 @@ struct LiveLocationSharingViewer: View {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Bottom sheet
|
||||
|
||||
extension LiveLocationSharingViewer {
|
||||
var sheetStyle: BottomSheetStyle {
|
||||
var bottomSheetStyle = BottomSheetStyle.standard
|
||||
|
||||
bottomSheetStyle.snapRatio = 0.16
|
||||
|
||||
let backgroundColor = theme.colors.background
|
||||
|
||||
let handleStyle = BottomSheetHandleStyle(backgroundColor: backgroundColor, dividerColor: backgroundColor)
|
||||
bottomSheetStyle.handleStyle = handleStyle
|
||||
|
||||
return bottomSheetStyle
|
||||
}
|
||||
|
||||
var sheet: some BottomSheetView {
|
||||
BottomSheet(
|
||||
isExpanded: $isBottomSheetExpanded,
|
||||
minHeight: .points(bottomSheetCollapsedHeight),
|
||||
maxHeight: .available,
|
||||
style: sheetStyle
|
||||
) {
|
||||
userLocationList
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Previews
|
||||
|
||||
struct LiveLocationSharingViewer_Previews: PreviewProvider {
|
||||
|
||||
Reference in New Issue
Block a user