remove map tiler url from matrix wellknown

This commit is contained in:
Mauro Romito
2026-08-04 13:42:51 +02:00
committed by Mauro
parent 80530f0006
commit 748ec818ac
22 changed files with 120 additions and 280 deletions
@@ -29,18 +29,4 @@ nonisolated extension ClientProtocol {
return .failure(.sdkError(error))
}
}
/// Reads the homeserver-advertised map tile server (`tile_server.map_style_url`
/// from the matrix client well-known) and applies it to ``AppSettings``.
///
/// Clears any previously applied URL when none is advertised (or the well-known
/// is unavailable), so each session start reflects the latest server-side
/// configuration.
func updateMapTilerSettings(in appSettings: AppSettings) async {
if let url = await tileServer().flatMap({ URL(string: $0.mapStyleUrl) }) {
appSettings.mapTilerSettings.applyRemoteValue(.url(url))
} else {
appSettings.mapTilerSettings.reset()
}
}
}