Trim newlines from user agent (#7858)

* trim newlines from user agent

* fix indents

* fix indents for real

* actually fix indents
This commit is contained in:
Mubashir Haroon 2022-08-26 18:18:09 +05:00 committed by GitHub
parent 03b9950fa1
commit aab5f083db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -231,11 +231,11 @@ class SettingsAdvancedController(
onChange { onChange {
if (it.toString().isBlank()) { if (it.toString().isBlank()) {
activity?.toast(R.string.error_user_agent_string_blank) activity?.toast(R.string.error_user_agent_string_blank)
false
} else { } else {
text = it.toString().trim()
activity?.toast(R.string.requires_app_restart) activity?.toast(R.string.requires_app_restart)
true
} }
false
} }
} }
preference { preference {