From b453be081e6dda23067201d2507a3b9c4a2ef025 Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 2 May 2021 13:29:20 -0400 Subject: [PATCH] Fix settings search crash (fixes #5002) Can't lateinit since the controllers are instantiated via reflection. --- .../java/eu/kanade/tachiyomi/ui/setting/SettingsController.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsController.kt index fed170be1..6ca3b068e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsController.kt @@ -33,11 +33,10 @@ abstract class SettingsController : PreferenceController() { var preferenceKey: String? = null val preferences: PreferencesHelper = Injekt.get() - lateinit var viewScope: CoroutineScope + val viewScope: CoroutineScope = MainScope() private var themedContext: Context? = null override fun onCreateView(inflater: LayoutInflater, container: ViewGroup, savedInstanceState: Bundle?): View { - viewScope = MainScope() val view = super.onCreateView(inflater, container, savedInstanceState) if (this is RootController) {