mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 20:31:02 -05:00
Always update extensions list on enter
This commit is contained in:
parent
937d0852b3
commit
956b3284d3
1 changed files with 2 additions and 8 deletions
|
@ -10,8 +10,6 @@ import androidx.appcompat.widget.SearchView
|
|||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.bluelinelabs.conductor.ControllerChangeHandler
|
||||
import com.bluelinelabs.conductor.ControllerChangeType
|
||||
import com.bluelinelabs.conductor.RouterTransaction
|
||||
import com.bluelinelabs.conductor.changehandler.FadeChangeHandler
|
||||
import eu.davidea.flexibleadapter.FlexibleAdapter
|
||||
import eu.davidea.flexibleadapter.items.IFlexible
|
||||
import eu.kanade.tachiyomi.R
|
||||
|
@ -90,9 +88,7 @@ open class ExtensionController :
|
|||
R.id.action_search -> expandActionViewFromInteraction = true
|
||||
R.id.action_settings -> {
|
||||
(parentController as BrowseController).pushController(
|
||||
(RouterTransaction.with(ExtensionFilterController()))
|
||||
.popChangeHandler(SettingsExtensionsFadeChangeHandler())
|
||||
.pushChangeHandler(FadeChangeHandler())
|
||||
ExtensionFilterController().withFadeTransaction()
|
||||
)
|
||||
}
|
||||
else -> return super.onOptionsItemSelected(item)
|
||||
|
@ -102,7 +98,7 @@ open class ExtensionController :
|
|||
|
||||
override fun onChangeStarted(handler: ControllerChangeHandler, type: ControllerChangeType) {
|
||||
super.onChangeStarted(handler, type)
|
||||
if (!type.isPush && handler is SettingsExtensionsFadeChangeHandler) {
|
||||
if (type.isPush) {
|
||||
presenter.findAvailableExtensions()
|
||||
}
|
||||
}
|
||||
|
@ -211,6 +207,4 @@ open class ExtensionController :
|
|||
override fun uninstallExtension(pkgName: String) {
|
||||
presenter.uninstallExtension(pkgName)
|
||||
}
|
||||
|
||||
class SettingsExtensionsFadeChangeHandler : FadeChangeHandler()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue