Let element enterprise be able to configure id for mapTiler. (#4446)
* Let element enterprise configure the ids for maptiler service. * Disable location sharing and location viewer is the service is not available. * Fix compilation issue on connected test * Do not allow to reload the map if the mapId is not available. * Update screenshots * Rename file. * Better to inject a string provider here, so we can unit test DefaultLocationService. --------- Co-authored-by: ElementBot <android@element.io>
This commit is contained in:
parent
60f1c9500f
commit
2fd1c21df0
24 changed files with 198 additions and 36 deletions
|
|
@ -12,15 +12,19 @@ import io.element.android.services.toolbox.api.strings.StringProvider
|
|||
class FakeStringProvider(
|
||||
private val defaultResult: String = "A string"
|
||||
) : StringProvider {
|
||||
var lastResIdParam: Int? = null
|
||||
override fun getString(resId: Int): String {
|
||||
lastResIdParam = resId
|
||||
return defaultResult
|
||||
}
|
||||
|
||||
override fun getString(resId: Int, vararg formatArgs: Any?): String {
|
||||
lastResIdParam = resId
|
||||
return defaultResult + formatArgs.joinToString()
|
||||
}
|
||||
|
||||
override fun getQuantityString(resId: Int, quantity: Int, vararg formatArgs: Any?): String {
|
||||
lastResIdParam = resId
|
||||
return defaultResult + " ($quantity) " + formatArgs.joinToString()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue