Show toast for app restart when User-Agent is changed (#1204)

This commit is contained in:
NGB-Was-Taken 2024-09-07 14:00:22 +05:45 committed by GitHub
parent fbcc48fefc
commit c8ad6cdf31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -264,6 +264,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