mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Give ability to configure the Firebase push gateway.
This commit is contained in:
+2
@@ -17,4 +17,6 @@ interface EnterpriseService {
|
||||
|
||||
fun semanticColorsLight(): SemanticColors
|
||||
fun semanticColorsDark(): SemanticColors
|
||||
|
||||
fun firebasePushGateway(): String?
|
||||
}
|
||||
|
||||
+2
@@ -27,4 +27,6 @@ class DefaultEnterpriseService @Inject constructor() : EnterpriseService {
|
||||
override fun semanticColorsLight(): SemanticColors = compoundColorsLight
|
||||
|
||||
override fun semanticColorsDark(): SemanticColors = compoundColorsDark
|
||||
|
||||
override fun firebasePushGateway(): String? = null
|
||||
}
|
||||
|
||||
+5
@@ -19,6 +19,7 @@ class FakeEnterpriseService(
|
||||
private val defaultHomeserverResult: () -> String? = { A_FAKE_HOMESERVER },
|
||||
private val semanticColorsLightResult: () -> SemanticColors = { lambdaError() },
|
||||
private val semanticColorsDarkResult: () -> SemanticColors = { lambdaError() },
|
||||
private val firebasePushGatewayResult: () -> String? = { lambdaError() },
|
||||
) : EnterpriseService {
|
||||
override suspend fun isEnterpriseUser(sessionId: SessionId): Boolean = simulateLongTask {
|
||||
isEnterpriseUserResult(sessionId)
|
||||
@@ -36,6 +37,10 @@ class FakeEnterpriseService(
|
||||
return semanticColorsDarkResult()
|
||||
}
|
||||
|
||||
override fun firebasePushGateway(): String? {
|
||||
return firebasePushGatewayResult()
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val A_FAKE_HOMESERVER = "a_fake_homeserver"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user