mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
+5
@@ -221,6 +221,11 @@ interface MatrixClient {
|
||||
*/
|
||||
suspend fun performDatabaseVacuum(): Result<Unit>
|
||||
|
||||
/**
|
||||
* Returns the URL of the map style configured on the server, if any.
|
||||
*/
|
||||
suspend fun getMapStyleUrl(): Result<String?>
|
||||
|
||||
/**
|
||||
* Resets the cached client `well-known` config by the SDK.
|
||||
*/
|
||||
|
||||
+6
@@ -808,6 +808,12 @@ class RustMatrixClient(
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun getMapStyleUrl(): Result<String?> = withContext(sessionDispatcher) {
|
||||
runCatchingExceptions {
|
||||
innerClient.tileServer()?.mapStyleUrl
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun resetWellKnownConfig(): Result<Unit> {
|
||||
return runCatchingExceptions {
|
||||
Timber.d("Resetting well-known config for session $sessionId")
|
||||
|
||||
+2
-1
@@ -44,7 +44,8 @@ class RustPushersService(
|
||||
appDisplayName = setHttpPusherData.appDisplayName,
|
||||
deviceDisplayName = setHttpPusherData.deviceDisplayName,
|
||||
profileTag = setHttpPusherData.profileTag,
|
||||
lang = setHttpPusherData.lang
|
||||
lang = setHttpPusherData.lang,
|
||||
append = false,
|
||||
)
|
||||
}
|
||||
.mapFailure { it.mapClientException() }
|
||||
|
||||
+5
@@ -115,6 +115,7 @@ class FakeMatrixClient(
|
||||
private val addRecentEmojiLambda: (String) -> Result<Unit> = { Result.success(Unit) },
|
||||
private val markRoomAsFullyReadResult: (RoomId, EventId) -> Result<Unit> = { _, _ -> lambdaError() },
|
||||
private val performDatabaseVacuumLambda: () -> Result<Unit> = { lambdaError() },
|
||||
private val getMapStyleUrlResult: () -> Result<String?> = { lambdaError() },
|
||||
private val getDatabaseSizesLambda: () -> Result<SdkStoreSizes> = { lambdaError() },
|
||||
private val resetWellKnownConfigLambda: () -> Result<Unit> = { lambdaError() },
|
||||
) : MatrixClient {
|
||||
@@ -373,6 +374,10 @@ class FakeMatrixClient(
|
||||
return performDatabaseVacuumLambda()
|
||||
}
|
||||
|
||||
override suspend fun getMapStyleUrl(): Result<String?> = simulateLongTask {
|
||||
getMapStyleUrlResult()
|
||||
}
|
||||
|
||||
override suspend fun canLinkNewDevice(): Result<Boolean> = simulateLongTask {
|
||||
return canLinkNewDeviceResult()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user