Merge pull request #2873 from Philoul/FixPluginPreferenceOverview

Fix Plugin Preference enable for Overview
This commit is contained in:
Milos Kozak 2020-08-03 09:04:41 +02:00 committed by GitHub
commit 35ca0d22b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,7 +147,7 @@ class MainActivity : NoSplashAppCompatActivity() {
}
private fun checkPluginPreferences(viewPager: ViewPager2) {
if (viewPager.currentItem > 0) pluginPreferencesMenuItem?.isEnabled = (viewPager.adapter as TabPageAdapter).getPluginAt(viewPager.currentItem).preferencesId != -1
if (viewPager.currentItem >= 0) pluginPreferencesMenuItem?.isEnabled = (viewPager.adapter as TabPageAdapter).getPluginAt(viewPager.currentItem).preferencesId != -1
}
override fun onPostCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?) {