mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 01:19:33 +00:00
Made the hooks of room creation and security & privacy screen more generic.
This commit is contained in:
-6
@@ -29,10 +29,4 @@ interface SessionEnterpriseService {
|
||||
|
||||
/** Whether the homeserver forbids creating encrypted rooms, in which case the app must not offer the option. */
|
||||
suspend fun isEncryptionDisabledByHomeserver(): Boolean
|
||||
|
||||
/**
|
||||
* Whether the homeserver forbids public rooms and spaces, in which case the app must not offer to create one,
|
||||
* nor to make an existing room or space public.
|
||||
*/
|
||||
suspend fun arePublicRoomsDisabledByHomeserver(): Boolean
|
||||
}
|
||||
|
||||
-1
@@ -18,5 +18,4 @@ class DefaultSessionEnterpriseService : SessionEnterpriseService {
|
||||
override suspend fun tweakMasUrl(url: String): String = url
|
||||
override suspend fun isElementCallAvailable(): Boolean = true
|
||||
override suspend fun isEncryptionDisabledByHomeserver(): Boolean = false
|
||||
override suspend fun arePublicRoomsDisabledByHomeserver(): Boolean = false
|
||||
}
|
||||
|
||||
-5
@@ -16,7 +16,6 @@ class FakeSessionEnterpriseService(
|
||||
private val isElementCallAvailableResult: () -> Boolean = { lambdaError() },
|
||||
private val tweakMasUrlResult: (String) -> String = { lambdaError() },
|
||||
private val isEncryptionDisabledResult: () -> Boolean = { lambdaError() },
|
||||
private val arePublicRoomsDisabledResult: () -> Boolean = { lambdaError() },
|
||||
) : SessionEnterpriseService {
|
||||
override suspend fun init() {
|
||||
}
|
||||
@@ -32,8 +31,4 @@ class FakeSessionEnterpriseService(
|
||||
override suspend fun isEncryptionDisabledByHomeserver(): Boolean {
|
||||
return isEncryptionDisabledResult()
|
||||
}
|
||||
|
||||
override suspend fun arePublicRoomsDisabledByHomeserver(): Boolean {
|
||||
return arePublicRoomsDisabledResult()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user