mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 13:16:58 +02:00
Location sharing screen: Handle live location sharing.
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
|
||||
@@ -91,6 +97,8 @@ class LocationSharingViewModel: LocationSharingViewModelType, LocationSharingVie
|
||||
}
|
||||
|
||||
completion?(.share(latitude: location.latitude, longitude: location.longitude))
|
||||
case .shareLiveLocation:
|
||||
completion?(.shareLiveLocation(timeout: Constants.liveLocationSharingDefaultTimeout))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user