mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 03:20:50 +02:00
LiveLocationSharingViewerService: Handle user location updates and stop sharing.
This commit is contained in:
+25
-3
@@ -21,11 +21,13 @@ import CoreLocation
|
||||
@available(iOS 14.0, *)
|
||||
class MockLiveLocationSharingViewerService: LiveLocationSharingViewerServiceProtocol {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
private(set) var usersLiveLocation: [UserLiveLocation] = []
|
||||
|
||||
func isCurrentUserId(_ userId: String) -> Bool {
|
||||
return "@alice:matrix.org" == userId
|
||||
}
|
||||
var didUpdateUsersLiveLocation: (([UserLiveLocation]) -> Void)?
|
||||
|
||||
// MARK: Setup
|
||||
|
||||
init(generateRandomUsers: Bool = false) {
|
||||
|
||||
@@ -46,6 +48,26 @@ class MockLiveLocationSharingViewerService: LiveLocationSharingViewerServiceProt
|
||||
self.usersLiveLocation = usersLiveLocation
|
||||
}
|
||||
|
||||
// MARK: Public
|
||||
|
||||
func isCurrentUserId(_ userId: String) -> Bool {
|
||||
return "@alice:matrix.org" == userId
|
||||
}
|
||||
|
||||
func startListenningLiveLocationUpdates() {
|
||||
|
||||
}
|
||||
|
||||
func stopListenningLiveLocationUpdates() {
|
||||
|
||||
}
|
||||
|
||||
func stopUserLiveLocationSharing(completion: @escaping (Result<Void, Error>) -> Void) {
|
||||
|
||||
}
|
||||
|
||||
// MARK: Private
|
||||
|
||||
private func createFirstUserLiveLocation() -> UserLiveLocation {
|
||||
let userAvatarData = AvatarInput(mxContentUri: nil, matrixItemId: "@alice:matrix.org", displayName: "Alice")
|
||||
let userCoordinate = CLLocationCoordinate2D(latitude: 51.4932641, longitude: -0.257096)
|
||||
|
||||
Reference in New Issue
Block a user