Fix HistoryScene history clearall, #629

This commit is contained in:
tarsin committed 2023-01-06 12:22:57 +08:00
1 parent 05a5be336e
commit 8511907390
1 file changed
+7 -3
@@ -198,9 +198,13 @@ class HistoryScene : BaseToolbarScene() {
if (DialogInterface.BUTTON_POSITIVE != which) {
return@setPositiveButton
}
EhDB.clearHistoryInfo()
mAdapter.refresh()
mAdapter.notifyDataSetChanged()
lifecycleScope.launchIO {
EhDB.clearHistoryInfo()
withUIContext {
mAdapter.refresh()
mAdapter.notifyDataSetChanged()
}
}
}
.setNegativeButton(android.R.string.cancel, null)
.show()