mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 06:09:55 +01:00
Use a dedicated summary for 'never lock Briar' for proper English
This commit is contained in:
@@ -460,7 +460,20 @@ public class SettingsFragment extends PreferenceFragmentCompat
|
|||||||
int timeout = settings.getInt(PREF_SCREEN_LOCK_TIMEOUT,
|
int timeout = settings.getInt(PREF_SCREEN_LOCK_TIMEOUT,
|
||||||
Integer.valueOf(getString(
|
Integer.valueOf(getString(
|
||||||
R.string.pref_lock_timeout_value_default)));
|
R.string.pref_lock_timeout_value_default)));
|
||||||
screenLockTimeout.setValue(String.valueOf(timeout));
|
String newValue = String.valueOf(timeout);
|
||||||
|
screenLockTimeout.setValue(newValue);
|
||||||
|
setScreenLockTimeoutSummary(newValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setScreenLockTimeoutSummary(String timeout) {
|
||||||
|
String never = getString(R.string.pref_lock_timeout_value_never);
|
||||||
|
if (timeout.equals(never)) {
|
||||||
|
screenLockTimeout
|
||||||
|
.setSummary(R.string.pref_lock_timeout_never_summary);
|
||||||
|
} else {
|
||||||
|
screenLockTimeout
|
||||||
|
.setSummary(R.string.pref_lock_timeout_summary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -525,9 +538,10 @@ public class SettingsFragment extends PreferenceFragmentCompat
|
|||||||
storeSettings(s);
|
storeSettings(s);
|
||||||
} else if (preference == screenLockTimeout) {
|
} else if (preference == screenLockTimeout) {
|
||||||
Settings s = new Settings();
|
Settings s = new Settings();
|
||||||
s.putInt(PREF_SCREEN_LOCK_TIMEOUT,
|
String value = (String) newValue;
|
||||||
Integer.valueOf((String) newValue));
|
s.putInt(PREF_SCREEN_LOCK_TIMEOUT, Integer.valueOf(value));
|
||||||
storeSettings(s);
|
storeSettings(s);
|
||||||
|
setScreenLockTimeoutSummary(value);
|
||||||
} else if (preference == notifyPrivateMessages) {
|
} else if (preference == notifyPrivateMessages) {
|
||||||
Settings s = new Settings();
|
Settings s = new Settings();
|
||||||
s.putBoolean(PREF_NOTIFY_PRIVATE, (Boolean) newValue);
|
s.putBoolean(PREF_NOTIFY_PRIVATE, (Boolean) newValue);
|
||||||
|
|||||||
@@ -361,13 +361,15 @@
|
|||||||
<string name="pref_lock_summary">Use the device\'s screen lock to protect Briar while signed in</string>
|
<string name="pref_lock_summary">Use the device\'s screen lock to protect Briar while signed in</string>
|
||||||
<string name="pref_lock_disabled_summary">Set up a screen lock for your device to protect Briar while signed in</string>
|
<string name="pref_lock_disabled_summary">Set up a screen lock for your device to protect Briar while signed in</string>
|
||||||
<string name="pref_lock_timeout_title">Screen Lock Inactivity Timeout</string>
|
<string name="pref_lock_timeout_title">Screen Lock Inactivity Timeout</string>
|
||||||
|
<!-- The %s placeholder is replaces with the following time spans, e.g. after 5 Minutes -->
|
||||||
<string name="pref_lock_timeout_summary">When not using Briar, automatically lock it %s</string>
|
<string name="pref_lock_timeout_summary">When not using Briar, automatically lock it %s</string>
|
||||||
<string name="pref_lock_timeout_never">never</string>
|
|
||||||
<string name="pref_lock_timeout_1">after 1 Minute</string>
|
<string name="pref_lock_timeout_1">after 1 Minute</string>
|
||||||
<string name="pref_lock_timeout_5">after 5 Minutes</string>
|
<string name="pref_lock_timeout_5">after 5 Minutes</string>
|
||||||
<string name="pref_lock_timeout_15">after 15 Minutes</string>
|
<string name="pref_lock_timeout_15">after 15 Minutes</string>
|
||||||
<string name="pref_lock_timeout_30">after 30 Minutes</string>
|
<string name="pref_lock_timeout_30">after 30 Minutes</string>
|
||||||
<string name="pref_lock_timeout_60">after 1 Hour</string>
|
<string name="pref_lock_timeout_60">after 1 Hour</string>
|
||||||
|
<string name="pref_lock_timeout_never">never</string>
|
||||||
|
<string name="pref_lock_timeout_never_summary">Never lock Briar automatically</string>
|
||||||
|
|
||||||
<string name="change_password">Change password</string>
|
<string name="change_password">Change password</string>
|
||||||
<string name="current_password">Current password</string>
|
<string name="current_password">Current password</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user