Read tile server URL from .well-known (PSG-592)

Signed-off-by: Johannes Marbach <johannesm@element.io>
This commit is contained in:
Johannes Marbach
2022-07-25 17:00:37 +02:00
parent b9b563928d
commit 5b4e98fe95
7 changed files with 34 additions and 23 deletions
@@ -49,7 +49,9 @@ final class LiveLocationSharingViewerCoordinator: Coordinator, Presentable {
let service = LiveLocationSharingViewerService(session: parameters.session, roomId: parameters.roomId)
let viewModel = LiveLocationSharingViewerViewModel(mapStyleURL: BuildSettings.tileServerMapStyleURL, service: service)
let viewModel = LiveLocationSharingViewerViewModel(
mapStyleURL: parameters.session.vc_homeserverConfiguration().tileServer.mapStyleURL,
service: service)
let view = LiveLocationSharingViewer(viewModel: viewModel.context)
.addDependency(AvatarService.instantiate(mediaManager: parameters.session.mediaManager))
liveLocationSharingViewerViewModel = viewModel
@@ -28,7 +28,7 @@ class LiveLocationSharingViewerViewModelTests: XCTestCase {
override func setUpWithError() throws {
service = MockLiveLocationSharingViewerService()
viewModel = LiveLocationSharingViewerViewModel(mapStyleURL: BuildSettings.tileServerMapStyleURL, service: service)
viewModel = LiveLocationSharingViewerViewModel(mapStyleURL: BuildSettings.defaultTileServerMapStyleURL, service: service)
context = viewModel.context
}
}