mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 19:27:25 +01:00
Always update sources list on enter (fixes #2999)
This commit is contained in:
parent
cf2967cf34
commit
937d0852b3
@ -188,7 +188,7 @@ open class ExtensionController :
|
|||||||
(parentController as BrowseController).setExtensionUpdateBadge()
|
(parentController as BrowseController).setExtensionUpdateBadge()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun drawExtensions() {
|
private fun drawExtensions() {
|
||||||
if (!query.isBlank()) {
|
if (!query.isBlank()) {
|
||||||
adapter?.updateDataSet(
|
adapter?.updateDataSet(
|
||||||
extensions.filter {
|
extensions.filter {
|
||||||
|
@ -13,8 +13,6 @@ import com.afollestad.materialdialogs.MaterialDialog
|
|||||||
import com.afollestad.materialdialogs.list.listItems
|
import com.afollestad.materialdialogs.list.listItems
|
||||||
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
|
||||||
@ -103,7 +101,7 @@ class SourceController :
|
|||||||
|
|
||||||
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 SettingsSourcesFadeChangeHandler) {
|
if (type.isPush) {
|
||||||
presenter.updateSources()
|
presenter.updateSources()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -205,8 +203,10 @@ class SourceController :
|
|||||||
.launchIn(scope)
|
.launchIn(scope)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun performGlobalSearch(query: String) {
|
private fun performGlobalSearch(query: String) {
|
||||||
(parentController as BrowseController).pushController(GlobalSearchController(query).withFadeTransaction())
|
(parentController as BrowseController).pushController(
|
||||||
|
GlobalSearchController(query).withFadeTransaction()
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -220,9 +220,7 @@ class SourceController :
|
|||||||
// 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 as BrowseController).pushController(
|
||||||
(RouterTransaction.with(SettingsSourcesController()))
|
SettingsSourcesController().withFadeTransaction()
|
||||||
.popChangeHandler(SettingsSourcesFadeChangeHandler())
|
|
||||||
.pushChangeHandler(FadeChangeHandler())
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -246,6 +244,4 @@ class SourceController :
|
|||||||
adapter?.addScrollableHeader(LangItem(SourcePresenter.LAST_USED_KEY))
|
adapter?.addScrollableHeader(LangItem(SourcePresenter.LAST_USED_KEY))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class SettingsSourcesFadeChangeHandler : FadeChangeHandler()
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user