mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-29 04:36:58 +02:00
Merge branch 'develop' into maximee/5982_ls_static_share_viewer
This commit is contained in:
@@ -25,6 +25,12 @@ typealias LocationSharingViewModelType = StateStoreViewModel<LocationSharingView
|
||||
@available(iOS 14, *)
|
||||
class LocationSharingViewModel: LocationSharingViewModelType, LocationSharingViewModelProtocol {
|
||||
|
||||
// MARK: - Constants
|
||||
|
||||
private enum Constants {
|
||||
static let liveLocationSharingDefaultTimeout: TimeInterval = 300 // 5 minutes
|
||||
}
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
@@ -74,6 +80,8 @@ class LocationSharingViewModel: LocationSharingViewModelType, LocationSharingVie
|
||||
completion?(.share(latitude: pinLocation.latitude, longitude: pinLocation.longitude, coordinateType: .pin))
|
||||
case .goToUserLocation:
|
||||
state.bindings.pinLocation = nil
|
||||
case .shareLiveLocation:
|
||||
completion?(.shareLiveLocation(timeout: Constants.liveLocationSharingDefaultTimeout))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user