mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
translate "no proxy" in settings
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
5f53005556
commit
f6b481cea8
@ -587,7 +587,9 @@ class SettingsActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (("No proxy" == appPreferences.proxyType) || appPreferences.proxyType == null) {
|
if (((context.resources.getString(R.string.nc_no_proxy)) == appPreferences.proxyType) ||
|
||||||
|
appPreferences.proxyType == null
|
||||||
|
) {
|
||||||
hideProxySettings()
|
hideProxySettings()
|
||||||
} else {
|
} else {
|
||||||
showProxySettings()
|
showProxySettings()
|
||||||
@ -987,7 +989,7 @@ class SettingsActivity : BaseActivity() {
|
|||||||
proxyTypeFlow.collect { newString ->
|
proxyTypeFlow.collect { newString ->
|
||||||
if (newString != state) {
|
if (newString != state) {
|
||||||
state = newString
|
state = newString
|
||||||
if (("No proxy" == newString) || newString.isEmpty()) {
|
if (((context.resources.getString(R.string.nc_no_proxy)) == newString) || newString.isEmpty()) {
|
||||||
hideProxySettings()
|
hideProxySettings()
|
||||||
} else {
|
} else {
|
||||||
when (newString) {
|
when (newString) {
|
||||||
|
@ -41,7 +41,9 @@ import kotlinx.coroutines.runBlocking
|
|||||||
class AppPreferencesImpl(val context: Context) : AppPreferences {
|
class AppPreferencesImpl(val context: Context) : AppPreferences {
|
||||||
|
|
||||||
override fun getProxyType(): String {
|
override fun getProxyType(): String {
|
||||||
return runBlocking { async { readString(PROXY_TYPE, "No proxy").first() } }.getCompleted()
|
return runBlocking {
|
||||||
|
async { readString(PROXY_TYPE, context.resources.getString(R.string.nc_no_proxy)).first() }
|
||||||
|
}.getCompleted()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun setProxyType(proxyType: String?) = runBlocking<Unit> {
|
override fun setProxyType(proxyType: String?) = runBlocking<Unit> {
|
||||||
|
Loading…
Reference in New Issue
Block a user