Dismiss clear database confirm dialog on success (#7657)
(cherry picked from commit 9f5f101858b55624340999db9ad07e018662f6c0) # Conflicts: # app/src/main/java/eu/kanade/presentation/more/settings/database/ClearDatabaseScreen.kt
This commit is contained in:
parent
832f181501
commit
f0c0dbe649
@ -43,12 +43,14 @@ fun ClearDatabaseScreen(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (presenter.dialog is ClearDatabasePresenter.Dialog.Delete) {
|
val dialog = presenter.dialog
|
||||||
|
if (dialog is ClearDatabasePresenter.Dialog.Delete) {
|
||||||
ClearDatabaseDeleteDialog(
|
ClearDatabaseDeleteDialog(
|
||||||
onDismissRequest = { presenter.dialog = null },
|
onDismissRequest = { presenter.dialog = null },
|
||||||
onDelete = {
|
onDelete = {
|
||||||
presenter.removeMangaBySourceId((presenter.dialog as ClearDatabasePresenter.Dialog.Delete).sourceIds, /* SY --> */ it /* SY <-- */)
|
presenter.removeMangaBySourceId(dialog.sourceIds, /* SY --> */ it /* SY <-- */)
|
||||||
presenter.clearSelection()
|
presenter.clearSelection()
|
||||||
|
presenter.dialog = null
|
||||||
context.toast(R.string.clear_database_completed)
|
context.toast(R.string.clear_database_completed)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user