From 7878053df2e7c431f7d7a61b418567e4891bf87f Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 4 Sep 2021 22:31:25 -0400 Subject: [PATCH] Fix crash in settings search (fixes #5855) --- .../kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 eb51c3591..6d6bf750a 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 @@ -196,7 +196,7 @@ class SettingsAdvancedController : SettingsController() { summary = "%s" entriesRes = arrayOf(R.string.lock_always, R.string.landscape, R.string.lock_never) entryValues = PreferenceValues.TabletUiMode.values().map { it.name }.toTypedArray() - defaultValue = if (activity!!.applicationContext.isTablet()) { + defaultValue = if (context.isTablet()) { PreferenceValues.TabletUiMode.ALWAYS } else { PreferenceValues.TabletUiMode.NEVER