mirror of
https://github.com/mihonapp/mihon.git
synced 2024-12-25 02:18:24 +01:00
Always update extensions list on enter
This commit is contained in:
parent
937d0852b3
commit
956b3284d3
@ -10,8 +10,6 @@ import androidx.appcompat.widget.SearchView
|
|||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import com.bluelinelabs.conductor.ControllerChangeHandler
|
import com.bluelinelabs.conductor.ControllerChangeHandler
|
||||||
import com.bluelinelabs.conductor.ControllerChangeType
|
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.FlexibleAdapter
|
||||||
import eu.davidea.flexibleadapter.items.IFlexible
|
import eu.davidea.flexibleadapter.items.IFlexible
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
@ -90,9 +88,7 @@ open class ExtensionController :
|
|||||||
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 as BrowseController).pushController(
|
||||||
(RouterTransaction.with(ExtensionFilterController()))
|
ExtensionFilterController().withFadeTransaction()
|
||||||
.popChangeHandler(SettingsExtensionsFadeChangeHandler())
|
|
||||||
.pushChangeHandler(FadeChangeHandler())
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
else -> return super.onOptionsItemSelected(item)
|
else -> return super.onOptionsItemSelected(item)
|
||||||
@ -102,7 +98,7 @@ open class ExtensionController :
|
|||||||
|
|
||||||
override fun onChangeStarted(handler: ControllerChangeHandler, type: ControllerChangeType) {
|
override fun onChangeStarted(handler: ControllerChangeHandler, type: ControllerChangeType) {
|
||||||
super.onChangeStarted(handler, type)
|
super.onChangeStarted(handler, type)
|
||||||
if (!type.isPush && handler is SettingsExtensionsFadeChangeHandler) {
|
if (type.isPush) {
|
||||||
presenter.findAvailableExtensions()
|
presenter.findAvailableExtensions()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -211,6 +207,4 @@ open class ExtensionController :
|
|||||||
override fun uninstallExtension(pkgName: String) {
|
override fun uninstallExtension(pkgName: String) {
|
||||||
presenter.uninstallExtension(pkgName)
|
presenter.uninstallExtension(pkgName)
|
||||||
}
|
}
|
||||||
|
|
||||||
class SettingsExtensionsFadeChangeHandler : FadeChangeHandler()
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user