mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-26 14:53:41 +03:00
Show toast for app restart when User-Agent is changed (#1204)
(cherry picked from commit c8ad6cdf31a14bce9a525cfc2a0616e8ac51d7c3)
This commit is contained in:
parent
bae158d08b
commit
687a0d98da
1 changed files with 1 additions and 0 deletions
|
@ -285,6 +285,7 @@ object SettingsAdvancedScreen : SearchableSettings {
|
|||
try {
|
||||
// OkHttp checks for valid values internally
|
||||
Headers.Builder().add("User-Agent", it)
|
||||
context.toast(MR.strings.requires_app_restart)
|
||||
} catch (_: IllegalArgumentException) {
|
||||
context.toast(MR.strings.error_user_agent_string_invalid)
|
||||
return@EditTextPreference false
|
||||
|
|
Loading…
Reference in a new issue