Skip to content

Commit

Permalink
Merge pull request #3474 from nextcloud/bugfix/3472/translateNoProxy
Browse files Browse the repository at this point in the history
translate "no proxy" in settings
  • Loading branch information
mahibi authored Nov 29, 2023
2 parents 5f53005 + f6b481c commit 83a3d39
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
} else {
showProxySettings()
Expand Down Expand Up @@ -987,7 +989,7 @@ class SettingsActivity : BaseActivity() {
proxyTypeFlow.collect { newString ->
if (newString != state) {
state = newString
if (("No proxy" == newString) || newString.isEmpty()) {
if (((context.resources.getString(R.string.nc_no_proxy)) == newString) || newString.isEmpty()) {
hideProxySettings()
} else {
when (newString) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ import kotlinx.coroutines.runBlocking
class AppPreferencesImpl(val context: Context) : AppPreferences {

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> {
Expand Down

0 comments on commit 83a3d39

Please sign in to comment.