From aab5f083dbae25380b97c7407309beb90a64d845 Mon Sep 17 00:00:00 2001 From: Mubashir Haroon <48650614+mobi2002@users.noreply.github.com> Date: Fri, 26 Aug 2022 18:18:09 +0500 Subject: [PATCH] Trim newlines from user agent (#7858) * trim newlines from user agent * fix indents * fix indents for real * actually fix indents --- .../kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt index 8d75adffb9..a289ebbdaf 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt @@ -231,11 +231,11 @@ class SettingsAdvancedController( onChange { if (it.toString().isBlank()) { activity?.toast(R.string.error_user_agent_string_blank) - false } else { + text = it.toString().trim() activity?.toast(R.string.requires_app_restart) - true } + false } } preference {