Skip to content

Commit 51a0370

Browse files
committed
Fix: Refresh app list when AppDetail sheet is dismissed
1 parent cd18848 commit 51a0370

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/src/main/java/com/appcontrolx/ui/AppListFragment.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,15 @@ class AppListFragment : Fragment() {
210210
private fun showAppDetail(app: AppInfo) {
211211
val bottomSheet = AppDetailBottomSheet.newInstance(app)
212212
bottomSheet.onActionCompleted = {
213-
refreshAppList()
213+
// Will refresh when sheet is dismissed
214214
}
215215
bottomSheet.show(childFragmentManager, AppDetailBottomSheet.TAG)
216+
217+
// Refresh list when sheet is dismissed (after any action)
218+
childFragmentManager.executePendingTransactions()
219+
bottomSheet.dialog?.setOnDismissListener {
220+
refreshAppList()
221+
}
216222
}
217223

218224
private fun setupChips() {

0 commit comments

Comments
 (0)