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 -->
|
||||
onClickEnable = {
|
||||
screenModel.enableRepo(it)
|
||||
screenModel.refreshExtensionList()
|
||||
context.toast(KMR.strings.extensions_page_need_refresh)
|
||||
},
|
||||
onClickDisable = {
|
||||
screenModel.disableRepo(it)
|
||||
screenModel.refreshExtensionList()
|
||||
context.toast(KMR.strings.extensions_page_need_refresh)
|
||||
},
|
||||
// KMK <--
|
||||
|
|
|
|||
|
|
@ -144,6 +144,12 @@ class ExtensionReposScreenModel(
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
fun refreshExtensionList() {
|
||||
screenModelScope.launchIO {
|
||||
extensionManager.findAvailableExtensions()
|
||||
}
|
||||
}
|
||||
// KMK <--
|
||||
|
||||
fun showDialog(dialog: RepoDialog) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue