First plugin / Overview should register for preference name

This commit is contained in:
AdrianLxM 2021-01-20 09:51:31 +01:00 committed by GitHub
parent 6239f8e289
commit d665fdd0f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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])
}
}
}