Workaround download in UIContext
This commit is contained in:
1 parent
59f3cf20a5
commit
9ab368a760
1 file changed
+6
-4
@@ -280,10 +280,12 @@ suspend fun DialogState.doGalleryInfoAction(info: GalleryInfo, context: Context)
|
||||
with(requireActivity<MainActivity>(context)) {
|
||||
when (selected) {
|
||||
0 -> navToReader(info)
|
||||
1 -> if (downloaded) {
|
||||
if (confirmRemoveDownload(info)) DownloadManager.deleteDownload(info.gid)
|
||||
} else {
|
||||
CommonOperations.startDownload(this, info, false)
|
||||
1 -> withUIContext {
|
||||
if (downloaded) {
|
||||
if (confirmRemoveDownload(info)) DownloadManager.deleteDownload(info.gid)
|
||||
} else {
|
||||
CommonOperations.startDownload(this@with, info, false)
|
||||
}
|
||||
}
|
||||
2 -> if (favourite) {
|
||||
runSuspendCatching {
|
||||
|
||||
Reference in new issue
Block a user