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()) .popChangeHandler(SettingsSourcesFadeChangeHandler())
.pushChangeHandler(FadeChangeHandler())) .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_display_mode -> swapDisplayMode()
R.id.action_set_filter -> navView?.let { activity?.drawer?.openDrawer(GravityCompat.END) } R.id.action_set_filter -> navView?.let { activity?.drawer?.openDrawer(GravityCompat.END) }
R.id.action_open_in_web_view -> openInWebView() R.id.action_open_in_web_view -> openInWebView()
else -> return super.onOptionsItemSelected(item)
} }
return true return super.onOptionsItemSelected(item)
} }
private fun openInWebView() { private fun openInWebView() {

View file

@ -116,9 +116,8 @@ class DownloadController : NucleusController<DownloadPresenter>() {
DownloadService.stop(context) DownloadService.stop(context)
presenter.clearQueue() 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()) .popChangeHandler(SettingsExtensionsFadeChangeHandler())
.pushChangeHandler(FadeChangeHandler())) .pushChangeHandler(FadeChangeHandler()))
} }
else -> return super.onOptionsItemSelected(item)
} }
return true return super.onOptionsItemSelected(item)
} }
override fun onChangeStarted(handler: ControllerChangeHandler, type: ControllerChangeType) { override fun onChangeStarted(handler: ControllerChangeHandler, type: ControllerChangeType) {

View file

@ -374,10 +374,9 @@ class LibraryController(
R.id.action_source_migration -> { R.id.action_source_migration -> {
router.pushController(MigrationController().withFadeTransaction()) 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() activity?.invalidateOptionsMenu()
} }
R.id.action_sort -> presenter.revertSortOrder() R.id.action_sort -> presenter.revertSortOrder()
else -> return super.onOptionsItemSelected(item)
} }
return true return super.onOptionsItemSelected(item)
} }
fun onNextChapters(chapters: List<ChapterItem>) { fun onNextChapters(chapters: List<ChapterItem>) {

View file

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