Refresh the item as well if the confirmation dialog is canceled

This commit is contained in:
FooIbar authored and tarsin committed 2023-01-12 17:31:28 +08:00
1 parent 996ddbf3db
commit 2f7e84e126
2 files changed
+8 -2

No files matched your search

@@ -833,9 +833,11 @@ class DownloadsScene : BaseToolbarScene(), DownloadInfoListener, OnClickFabListe
0 -> {
mDownloadManager!!.allDownloadInfoList
}
1 -> {
mDownloadManager!!.defaultDownloadInfoList
}
else -> {
mDownloadManager!!.getLabelDownloadInfoList(label)
}
@@ -1193,7 +1195,9 @@ class DownloadsScene : BaseToolbarScene(), DownloadInfoListener, OnClickFabListe
mLabelAdapter!!.notifyItemRemoved(position)
}
}
}.setNegativeButton(android.R.string.cancel) { _, _ ->
}.setNegativeButton(android.R.string.cancel) { dialog, _ ->
dialog.cancel()
}.setOnCancelListener {
mLabelAdapter!!.notifyItemChanged(position)
}.show()
}
@@ -1420,7 +1420,9 @@ class GalleryListScene : SearchBarScene(), OnDragHandlerListener, SearchLayout.H
mAdapter.notifyItemRemoved(position)
}
}
}.setNegativeButton(android.R.string.cancel) { _, _ ->
}.setNegativeButton(android.R.string.cancel) { dialog, _ ->
dialog.cancel()
}.setOnCancelListener {
mAdapter.notifyItemChanged(position)
}.show()
}