Add new line check to user agent preference
This commit is contained in:
parent
4b9a6541d1
commit
402bbe9d9a
@ -232,6 +232,9 @@ class SettingsAdvancedController(
|
||||
if (it.toString().isBlank()) {
|
||||
activity?.toast(R.string.error_user_agent_string_blank)
|
||||
false
|
||||
} else if (it.toString().contains("\n")) {
|
||||
activity?.toast(R.string.error_user_agent_string_no_newline)
|
||||
false
|
||||
} else {
|
||||
activity?.toast(R.string.requires_app_restart)
|
||||
true
|
||||
|
@ -484,6 +484,7 @@
|
||||
<string name="pref_dns_over_https">DNS over HTTPS (DoH)</string>
|
||||
<string name="pref_user_agent_string">Default user agent string</string>
|
||||
<string name="error_user_agent_string_blank">User agent string can not be blank</string>
|
||||
<string name="error_user_agent_string_no_newline">User agent string can not contain new line</string>
|
||||
<string name="pref_reset_user_agent_string">Reset default user agent string</string>
|
||||
<string name="requires_app_restart">Requires app restart to take effect</string>
|
||||
<string name="cookies_cleared">Cookies cleared</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user