Merge pull request #245 from nightscout/fix/overview-preference-name
First plugin / Overview should register for preference name
This commit is contained in:
commit
8722b64b03
|
@ -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])
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue