mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 09:11:59 +01:00
Remove redundant helper function
This commit is contained in:
parent
035038a0b6
commit
620be2617a
@ -95,10 +95,6 @@ class BrowseController :
|
|||||||
tabs.getTabAt(EXTENSIONS_CONTROLLER)?.removeBadge()
|
tabs.getTabAt(EXTENSIONS_CONTROLLER)?.removeBadge()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun pushController(transaction: RouterTransaction) {
|
|
||||||
router.pushController(transaction)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun setExtensionUpdateBadge() {
|
fun setExtensionUpdateBadge() {
|
||||||
activity?.tabs?.apply {
|
activity?.tabs?.apply {
|
||||||
val updates = preferences.extensionUpdatesCount().get()
|
val updates = preferences.extensionUpdatesCount().get()
|
||||||
|
@ -87,7 +87,7 @@ open class ExtensionController :
|
|||||||
when (item.itemId) {
|
when (item.itemId) {
|
||||||
R.id.action_search -> expandActionViewFromInteraction = true
|
R.id.action_search -> expandActionViewFromInteraction = true
|
||||||
R.id.action_settings -> {
|
R.id.action_settings -> {
|
||||||
(parentController as BrowseController).pushController(
|
parentController!!.router.pushController(
|
||||||
ExtensionFilterController().withFadeTransaction()
|
ExtensionFilterController().withFadeTransaction()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -167,7 +167,7 @@ open class ExtensionController :
|
|||||||
|
|
||||||
private fun openDetails(extension: Extension.Installed) {
|
private fun openDetails(extension: Extension.Installed) {
|
||||||
val controller = ExtensionDetailsController(extension.pkgName)
|
val controller = ExtensionDetailsController(extension.pkgName)
|
||||||
(parentController as BrowseController).pushController(controller.withFadeTransaction())
|
parentController!!.router.pushController(controller.withFadeTransaction())
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun openTrustDialog(extension: Extension.Untrusted) {
|
private fun openTrustDialog(extension: Extension.Untrusted) {
|
||||||
|
@ -185,7 +185,7 @@ class SourceController :
|
|||||||
*/
|
*/
|
||||||
private fun openCatalogue(source: CatalogueSource, controller: BrowseSourceController) {
|
private fun openCatalogue(source: CatalogueSource, controller: BrowseSourceController) {
|
||||||
preferences.lastUsedCatalogueSource().set(source.id)
|
preferences.lastUsedCatalogueSource().set(source.id)
|
||||||
(parentController as BrowseController).pushController(controller.withFadeTransaction())
|
parentController!!.router.pushController(controller.withFadeTransaction())
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -214,7 +214,7 @@ class SourceController :
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun performGlobalSearch(query: String) {
|
private fun performGlobalSearch(query: String) {
|
||||||
(parentController as BrowseController).pushController(
|
parentController!!.router.pushController(
|
||||||
GlobalSearchController(query).withFadeTransaction()
|
GlobalSearchController(query).withFadeTransaction()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -229,7 +229,7 @@ class SourceController :
|
|||||||
when (item.itemId) {
|
when (item.itemId) {
|
||||||
// Initialize option to open catalogue settings.
|
// Initialize option to open catalogue settings.
|
||||||
R.id.action_settings -> {
|
R.id.action_settings -> {
|
||||||
(parentController as BrowseController).pushController(
|
parentController!!.router.pushController(
|
||||||
SettingsSourcesController().withFadeTransaction()
|
SettingsSourcesController().withFadeTransaction()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user