LocationSharingViewModel: Handle location permission when starting live location sharing.

This commit is contained in:
SBiOSoftWhare
2022-05-16 17:04:05 +02:00
parent 92104f7c74
commit 2abfca4617
2 changed files with 39 additions and 6 deletions
@@ -28,10 +28,12 @@ enum MockLocationSharingScreenState: MockScreenState, CaseIterable {
var screenView: ([Any], AnyView) {
let locationSharingService = MockLocationSharingService()
let mapStyleURL = URL(string: "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx")!
let viewModel = LocationSharingViewModel(mapStyleURL: mapStyleURL,
avatarData: AvatarInput(mxContentUri: "", matrixItemId: "alice:matrix.org", displayName: "Alice"),
isLiveLocationSharingEnabled: true)
isLiveLocationSharingEnabled: true, service: locationSharingService)
return ([viewModel],
AnyView(LocationSharingView(context: viewModel.context)
.addDependency(MockAvatarService.example)))