mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 09:32:52 +02:00
Show own location in map views (#7375)
* show own location on static sharing * show own location on live sharing * add tests and changelog * check location authorisation, fix center to current user location button * it moves request to LocationManager in proper service * add static location viewer service
This commit is contained in:
+9
-1
@@ -79,10 +79,18 @@ class StaticLocationViewingViewModelTests: XCTestCase {
|
||||
waitForExpectations(timeout: 3)
|
||||
}
|
||||
|
||||
func testToggleShowUserLocation() {
|
||||
let viewModel = buildViewModel()
|
||||
XCTAssertFalse(viewModel.context.viewState.showsUserLocation)
|
||||
viewModel.context.send(viewAction: .showUserLocation)
|
||||
XCTAssertTrue(viewModel.context.viewState.showsUserLocation)
|
||||
}
|
||||
|
||||
private func buildViewModel() -> StaticLocationViewingViewModel {
|
||||
StaticLocationViewingViewModel(mapStyleURL: URL(string: "http://empty.com")!,
|
||||
avatarData: AvatarInput(mxContentUri: "", matrixItemId: "", displayName: ""),
|
||||
location: CLLocationCoordinate2D(latitude: 51.4932641, longitude: -0.257096),
|
||||
coordinateType: .user)
|
||||
coordinateType: .user,
|
||||
service: MockStaticLocationSharingViewerService())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user