fix: cherry picked NV commit to remove DSBottomSheet (MESSENGER-6854)

This commit is contained in:
Arnfried Griesert
2025-02-10 23:38:32 +01:00
parent 6c0f1b1935
commit 1c0416255f
3 changed files with 67 additions and 108 deletions

View File

@@ -56,7 +56,6 @@ end
def import_SwiftUI_pods
pod 'Introspect', '~> 0.1'
pod 'DSBottomSheet', '~> 0.3'
pod 'ZXingObjC', '~> 3.6.9'
end

View File

@@ -14,43 +14,48 @@ PODS:
- AFNetworking/Serialization (4.0.1)
- AFNetworking/UIKit (4.0.1):
- AFNetworking/NSURLSession
- BlueCryptor (1.0.32)
- BlueECC (1.2.5)
- BlueRSA (1.0.200)
- Down (0.11.0)
- DSBottomSheet (0.3.0)
- DSWaveformImage (6.1.1)
- FLEX (5.22.10)
- DTCoreText (1.6.26):
- DTCoreText/Core (= 1.6.26)
- DTFoundation/Core (~> 1.7.5)
- DTFoundation/DTAnimatedGIF (~> 1.7.5)
- DTFoundation/DTHTMLParser (~> 1.7.5)
- DTFoundation/UIKit (~> 1.7.5)
- DTCoreText/Core (1.6.26):
- DTFoundation/Core (~> 1.7.5)
- DTFoundation/DTAnimatedGIF (~> 1.7.5)
- DTFoundation/DTHTMLParser (~> 1.7.5)
- DTFoundation/UIKit (~> 1.7.5)
- DTFoundation/Core (1.7.19)
- DTFoundation/DTAnimatedGIF (1.7.19)
- DTFoundation/DTHTMLParser (1.7.19):
- DTFoundation/Core
- DTFoundation/UIKit (1.7.19):
- DTFoundation/Core
- DTTJailbreakDetection (0.4.0)
- FlowCommoniOS (1.12.2)
- GBDeviceInfo (7.1.0):
- GBDeviceInfo/Core (= 7.1.0)
- GBDeviceInfo/Core (7.1.0)
- GZIP (1.3.2)
- Introspect (0.12.0)
- JitsiMeetSDKLite (8.1.2-lite):
- JitsiWebRTC (~> 111.0)
- JitsiWebRTC (111.0.2)
- KeychainAccess (4.2.2)
- KituraContracts (1.2.1):
- LoggerAPI (~> 1.7)
- KTCenterFlowLayout (1.3.1)
- libbase58 (0.1.4)
- libPhoneNumber-iOS (0.9.15)
- LoggerAPI (1.9.200):
- Logging (~> 1.1)
- Logging (1.4.0)
- MatrixSDK (0.27.13):
- MatrixSDK/Core (= 0.27.13)
- MatrixSDK/Core (0.27.13):
- MatomoTracker (7.5.2):
- MatomoTracker/Core (= 7.5.2)
- MatomoTracker/Core (7.5.2)
- MatrixSDK (0.27.15):
- MatrixSDK/Core (= 0.27.15)
- MatrixSDK/Core (0.27.15):
- AFNetworking (~> 4.0.0)
- GZIP (~> 1.3.0)
- libbase58 (~> 0.1.4)
- MatrixSDKCrypto (= 0.4.3)
- Realm (= 10.27.0)
- SwiftyBeaver (= 1.9.5)
- MatrixSDK/JingleCallStack (0.27.13):
- JitsiMeetSDKLite (= 8.1.2-lite)
- MatrixSDK/Core
- MatrixSDKCrypto (0.4.3)
- ReadMoreTextView (3.0.1)
- Realm (10.27.0):
@@ -61,19 +66,9 @@ PODS:
- Reusable/View (= 4.1.2)
- Reusable/Storyboard (4.1.2)
- Reusable/View (4.1.2)
- Sentry (7.15.0):
- Sentry/Core (= 7.15.0)
- Sentry/Core (7.15.0)
- SideMenu (6.5.0)
- SwiftBase32 (0.9.0)
- SwiftFormat/CLI (0.54.5)
- SwiftGen (6.6.3)
- SwiftJWT (3.6.200):
- BlueCryptor (~> 1.0)
- BlueECC (~> 1.1)
- BlueRSA (~> 1.0)
- KituraContracts (~> 1.2)
- LoggerAPI (~> 1.7)
- SwiftLint (0.57.0)
- SwiftyBeaver (1.9.5)
- UICollectionViewLeftAlignedLayout (1.0.2)
@@ -86,25 +81,22 @@ PODS:
DEPENDENCIES:
- Down (~> 0.11.0)
- DSBottomSheet (~> 0.3)
- DSWaveformImage (~> 6.1.1)
- FLEX (~> 5.22.10)
- DTCoreText (= 1.6.26)
- DTTJailbreakDetection (~> 0.4.0)
- FlowCommoniOS (~> 1.12.0)
- GBDeviceInfo (~> 7.1.0)
- Introspect (~> 0.1)
- KeychainAccess (~> 4.2.2)
- KTCenterFlowLayout (~> 1.3.1)
- libPhoneNumber-iOS (~> 0.9.13)
- MatrixSDK (from `matrix-ios-sdk/MatrixSDK.podspec`)
- MatrixSDK/JingleCallStack (from `matrix-ios-sdk/MatrixSDK.podspec`)
- MatomoTracker (~> 7.5.2)
- MatrixSDK (from `https://dl-gitlab.example.com/bwmessenger/bundesmessenger/bundesmessenger-ios-sdk`, tag `v2.23.1`)
- ReadMoreTextView (~> 3.0.1)
- Reusable (~> 4.1)
- Sentry (~> 7.15.0)
- SideMenu (~> 6.5)
- SwiftBase32 (~> 0.9.0)
- SwiftFormat/CLI
- SwiftGen
- SwiftJWT (~> 3.6.200)
- SwiftLint
- UICollectionViewLeftAlignedLayout (~> 1.0.2)
- UICollectionViewRightAlignedLayout (~> 0.0.3)
@@ -113,40 +105,32 @@ DEPENDENCIES:
- ZXingObjC (~> 3.6.9)
SPEC REPOS:
trunk:
https://github.com/CocoaPods/Specs.git:
- AFNetworking
- BlueCryptor
- BlueECC
- BlueRSA
- DTCoreText
- DTFoundation
- DTTJailbreakDetection
- GZIP
- libbase58
- MatomoTracker
- MatrixSDKCrypto
- Realm
- SwiftyBeaver
trunk:
- Down
- DSBottomSheet
- DSWaveformImage
- FLEX
- FlowCommoniOS
- GBDeviceInfo
- GZIP
- Introspect
- JitsiMeetSDKLite
- JitsiWebRTC
- KeychainAccess
- KituraContracts
- KTCenterFlowLayout
- libbase58
- libPhoneNumber-iOS
- LoggerAPI
- Logging
- MatrixSDKCrypto
- ReadMoreTextView
- Realm
- Reusable
- Sentry
- SideMenu
- SwiftBase32
- SwiftFormat
- SwiftGen
- SwiftJWT
- SwiftLint
- SwiftyBeaver
- UICollectionViewLeftAlignedLayout
- UICollectionViewRightAlignedLayout
- WeakDictionary
@@ -155,41 +139,38 @@ SPEC REPOS:
EXTERNAL SOURCES:
MatrixSDK:
:path: matrix-ios-sdk/MatrixSDK.podspec
:git: https://dl-gitlab.example.com/bwmessenger/bundesmessenger/bundesmessenger-ios-sdk
:tag: v2.23.1
CHECKOUT OPTIONS:
MatrixSDK:
:git: https://dl-gitlab.example.com/bwmessenger/bundesmessenger/bundesmessenger-ios-sdk
:tag: v2.23.1
SPEC CHECKSUMS:
AFNetworking: 3bd23d814e976cd148d7d44c3ab78017b744cd58
BlueCryptor: b0aee3d9b8f367b49b30de11cda90e1735571c24
BlueECC: 0d18e93347d3ec6d41416de21c1ffa4d4cd3c2cc
BlueRSA: dfeef51db96bcc4edec654956c1581adbda4e6a3
Down: b6ba1bc985c9d2f4e15e3b293d2207766fa12612
DSBottomSheet: ca0ac37eb5af2dd54663f86b84382ed90a59be2a
DSWaveformImage: 3c718a0cf99291887ee70d1d0c18d80101d3d9ce
FLEX: f21ee4f498eed3f8a1eded66b21939fd3b7a22ce
DTCoreText: ec749e013f2e1f76de5e7c7634642e600a7467ce
DTFoundation: 76b624967cf5bcaae6bb057d622c536c36ef36d0
DTTJailbreakDetection: 5e356c5badc17995f65a83ed9483f787a0057b71
FlowCommoniOS: ca92071ab526dc89905495a37844fd7e78d1a7f2
GBDeviceInfo: 5d62fa85bdcce3ed288d83c28789adf1173e4376
GZIP: 3c0abf794bfce8c7cb34ea05a1837752416c8868
Introspect: b66b675de8a85d9ef832f3a710d8e3c7db186884
JitsiMeetSDKLite: 895213158cf62342069a10634a41d2f1c00057f7
JitsiWebRTC: 80f62908fcf2a1160e0d14b584323fb6e6be630b
KeychainAccess: c0c4f7f38f6fc7bbe58f5702e25f7bd2f65abf51
KituraContracts: e845e60dc8627ad0a76fa55ef20a45451d8f830b
KTCenterFlowLayout: 6e02b50ab2bd865025ae82fe266ed13b6d9eaf97
libbase58: 7c040313537b8c44b6e2d15586af8e21f7354efd
libbase58: 8abc2a53ac38cd37720c0acbc53ef3660e9016c2
libPhoneNumber-iOS: 0a32a9525cf8744fe02c5206eb30d571e38f7d75
LoggerAPI: ad9c4a6f1e32f518fdb43a1347ac14d765ab5e3d
Logging: beeb016c9c80cf77042d62e83495816847ef108b
MatrixSDK: b5756a518af19296b94e3ad9b6f16648f9eb17c3
MatomoTracker: 1d98ddc58322fd9d65e1a6886b8e41363047bd13
MatrixSDK: 12b379749b84ab5b3662042acb1914b9f9bb692b
MatrixSDKCrypto: 27bee960e0e8b3a3039f3f3e93dd2ec88299c77e
ReadMoreTextView: 19147adf93abce6d7271e14031a00303fe28720d
Realm: 9ca328bd7e700cc19703799785e37f77d1a130f2
Reusable: 6bae6a5e8aa793c9c441db0213c863a64bce9136
Sentry: 63ca44f5e0c8cea0ee5a07686b02e56104f41ef7
SideMenu: f583187d21c5b1dd04c72002be544b555a2627a2
SwiftBase32: 9399c25a80666dc66b51e10076bf591e3bbb8f17
SwiftFormat: 543a7b1ab4a6ce2d88bd5616a17903446ca3dc5c
SwiftGen: 4993cbf71cbc4886f775e26f8d5c3a1188ec9f99
SwiftJWT: 88c412708f58c169d431d344c87bc79a87c830ae
SwiftLint: eb47480d47c982481592c195c221d11013a679cc
SwiftyBeaver: 84069991dd5dca07d7069100985badaca7f0ce82
UICollectionViewLeftAlignedLayout: 830bf6fa5bab9f9b464f62e3384f9d2e00b3c0f6
@@ -198,6 +179,6 @@ SPEC CHECKSUMS:
zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c
ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5
PODFILE CHECKSUM: 484a1cdf04951cc82156f29de196efd76d3ad893
PODFILE CHECKSUM: 8e9f350d7011b2bfcf0a200516b533a1717af7ea
COCOAPODS: 1.15.2

View File

@@ -5,7 +5,6 @@
// Please see LICENSE 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
@@ -114,7 +111,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(
attribution: LocationSharingAttribution(),
@@ -135,8 +144,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))
})
}
@@ -147,34 +154,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 {