feat(extension): add refresh functionality for extension list after enabling/disabling repos (#1345)
This commit is contained in:
parent
dfacf681fa
commit
eb8e9ba986
2 changed files with 8 additions and 0 deletions
|
|
@ -52,10 +52,12 @@ class ExtensionReposScreen(
|
||||||
// KMK -->
|
// KMK -->
|
||||||
onClickEnable = {
|
onClickEnable = {
|
||||||
screenModel.enableRepo(it)
|
screenModel.enableRepo(it)
|
||||||
|
screenModel.refreshExtensionList()
|
||||||
context.toast(KMR.strings.extensions_page_need_refresh)
|
context.toast(KMR.strings.extensions_page_need_refresh)
|
||||||
},
|
},
|
||||||
onClickDisable = {
|
onClickDisable = {
|
||||||
screenModel.disableRepo(it)
|
screenModel.disableRepo(it)
|
||||||
|
screenModel.refreshExtensionList()
|
||||||
context.toast(KMR.strings.extensions_page_need_refresh)
|
context.toast(KMR.strings.extensions_page_need_refresh)
|
||||||
},
|
},
|
||||||
// KMK <--
|
// KMK <--
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,12 @@ class ExtensionReposScreenModel(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun refreshExtensionList() {
|
||||||
|
screenModelScope.launchIO {
|
||||||
|
extensionManager.findAvailableExtensions()
|
||||||
|
}
|
||||||
|
}
|
||||||
// KMK <--
|
// KMK <--
|
||||||
|
|
||||||
fun showDialog(dialog: RepoDialog) {
|
fun showDialog(dialog: RepoDialog) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue