Skip to content

Commit 83a3d39

Browse files
authored
Merge pull request #3474 from nextcloud/bugfix/3472/translateNoProxy
translate "no proxy" in settings
2 parents 5f53005 + f6b481c commit 83a3d39

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

app/src/main/java/com/nextcloud/talk/settings/SettingsActivity.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,9 @@ class SettingsActivity : BaseActivity() {
587587
}
588588
}
589589

590-
if (("No proxy" == appPreferences.proxyType) || appPreferences.proxyType == null) {
590+
if (((context.resources.getString(R.string.nc_no_proxy)) == appPreferences.proxyType) ||
591+
appPreferences.proxyType == null
592+
) {
591593
hideProxySettings()
592594
} else {
593595
showProxySettings()
@@ -987,7 +989,7 @@ class SettingsActivity : BaseActivity() {
987989
proxyTypeFlow.collect { newString ->
988990
if (newString != state) {
989991
state = newString
990-
if (("No proxy" == newString) || newString.isEmpty()) {
992+
if (((context.resources.getString(R.string.nc_no_proxy)) == newString) || newString.isEmpty()) {
991993
hideProxySettings()
992994
} else {
993995
when (newString) {

app/src/main/java/com/nextcloud/talk/utils/preferences/AppPreferencesImpl.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ import kotlinx.coroutines.runBlocking
4141
class AppPreferencesImpl(val context: Context) : AppPreferences {
4242

4343
override fun getProxyType(): String {
44-
return runBlocking { async { readString(PROXY_TYPE, "No proxy").first() } }.getCompleted()
44+
return runBlocking {
45+
async { readString(PROXY_TYPE, context.resources.getString(R.string.nc_no_proxy)).first() }
46+
}.getCompleted()
4547
}
4648

4749
override fun setProxyType(proxyType: String?) = runBlocking<Unit> {

0 commit comments

Comments
 (0)