mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 20:31:02 -05:00
Show toast for app restart when User-Agent is changed (#1204)
Some checks failed
CI / Build app (push) Has been cancelled
Some checks failed
CI / Build app (push) Has been cancelled
This commit is contained in:
parent
fbcc48fefc
commit
c8ad6cdf31
1 changed files with 1 additions and 0 deletions
|
@ -264,6 +264,7 @@ object SettingsAdvancedScreen : SearchableSettings {
|
||||||
try {
|
try {
|
||||||
// OkHttp checks for valid values internally
|
// OkHttp checks for valid values internally
|
||||||
Headers.Builder().add("User-Agent", it)
|
Headers.Builder().add("User-Agent", it)
|
||||||
|
context.toast(MR.strings.requires_app_restart)
|
||||||
} catch (_: IllegalArgumentException) {
|
} catch (_: IllegalArgumentException) {
|
||||||
context.toast(MR.strings.error_user_agent_string_invalid)
|
context.toast(MR.strings.error_user_agent_string_invalid)
|
||||||
return@EditTextPreference false
|
return@EditTextPreference false
|
||||||
|
|
Loading…
Reference in a new issue