feat(extension): add refresh functionality for extension list after enabling/disabling repos (#1345)

This commit is contained in:
Cuong-Tran 2025-12-30 13:34:01 +07:00
parent dfacf681fa
commit eb8e9ba986
No known key found for this signature in database
GPG key ID: 94EFFE320FE7A47C
2 changed files with 8 additions and 0 deletions

View file

@ -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 <--

View file

@ -144,6 +144,12 @@ class ExtensionReposScreenModel(
) )
} }
} }
fun refreshExtensionList() {
screenModelScope.launchIO {
extensionManager.findAvailableExtensions()
}
}
// KMK <-- // KMK <--
fun showDialog(dialog: RepoDialog) { fun showDialog(dialog: RepoDialog) {