Minor edit to onOptionsItemSelected fallthrough logic

This commit is contained in:
arkon 2020-02-05 22:53:49 -05:00
parent 94b2dd74de
commit 8feb4365dd
7 changed files with 7 additions and 14 deletions

View File

@ -210,9 +210,8 @@ class CatalogueController : NucleusController<CataloguePresenter>(),
.popChangeHandler(SettingsSourcesFadeChangeHandler())
.pushChangeHandler(FadeChangeHandler()))
}
else -> return super.onOptionsItemSelected(item)
}
return true
return super.onOptionsItemSelected(item)
}
/**

View File

@ -289,9 +289,8 @@ open class BrowseCatalogueController(bundle: Bundle) :
R.id.action_display_mode -> swapDisplayMode()
R.id.action_set_filter -> navView?.let { activity?.drawer?.openDrawer(GravityCompat.END) }
R.id.action_open_in_web_view -> openInWebView()
else -> return super.onOptionsItemSelected(item)
}
return true
return super.onOptionsItemSelected(item)
}
private fun openInWebView() {

View File

@ -116,9 +116,8 @@ class DownloadController : NucleusController<DownloadPresenter>() {
DownloadService.stop(context)
presenter.clearQueue()
}
else -> return super.onOptionsItemSelected(item)
}
return true
return super.onOptionsItemSelected(item)
}
/**

View File

@ -82,9 +82,8 @@ open class ExtensionController : NucleusController<ExtensionPresenter>(),
.popChangeHandler(SettingsExtensionsFadeChangeHandler())
.pushChangeHandler(FadeChangeHandler()))
}
else -> return super.onOptionsItemSelected(item)
}
return true
return super.onOptionsItemSelected(item)
}
override fun onChangeStarted(handler: ControllerChangeHandler, type: ControllerChangeType) {

View File

@ -374,10 +374,9 @@ class LibraryController(
R.id.action_source_migration -> {
router.pushController(MigrationController().withFadeTransaction())
}
else -> return super.onOptionsItemSelected(item)
}
return true
return super.onOptionsItemSelected(item)
}
/**

View File

@ -208,9 +208,8 @@ class ChaptersController : NucleusController<ChaptersPresenter>(),
activity?.invalidateOptionsMenu()
}
R.id.action_sort -> presenter.revertSortOrder()
else -> return super.onOptionsItemSelected(item)
}
return true
return super.onOptionsItemSelected(item)
}
fun onNextChapters(chapters: List<ChapterItem>) {

View File

@ -193,9 +193,8 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
when (item.itemId) {
R.id.action_settings -> ReaderSettingsSheet(this).show()
R.id.action_custom_filter -> ReaderColorFilterSheet(this).show()
else -> return super.onOptionsItemSelected(item)
}
return true
return super.onOptionsItemSelected(item)
}
/**