From d665fdd0f7737c8676b01192ca8c93b940de67c2 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Wed, 20 Jan 2021 09:51:31 +0100 Subject: [PATCH] First plugin / Overview should register for preference name --- app/src/main/java/info/nightscout/androidaps/MainActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/MainActivity.kt b/app/src/main/java/info/nightscout/androidaps/MainActivity.kt index f200267a6c..c03c218866 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/MainActivity.kt @@ -247,7 +247,7 @@ class MainActivity : NoSplashAppCompatActivity() { } private fun setPluginPreferenceMenuName() { - if (main_pager.currentItem > 0) { + if (main_pager.currentItem >= 0) { val plugin = (main_pager.adapter as TabPageAdapter).getPluginAt(main_pager.currentItem) this.menu?.findItem(R.id.nav_plugin_preferences)?.title = resourceHelper.gs(R.string.nav_preferences_plugin, plugin.name) } @@ -379,4 +379,4 @@ class MainActivity : NoSplashAppCompatActivity() { FirebaseCrashlytics.getInstance().setCustomKey("Hash", hashes[0]) } -} \ No newline at end of file +}