Suspend DownloadLabelDao delete

This commit is contained in:
tarsin committed 2023-07-12 10:05:24 +08:00
1 parent 28ce6ee13e
commit 89a108574a
3 files changed
+4 -5

No files matched your search

+2 -3
View File
@@ -141,10 +141,9 @@ object EhDB {
dao.update(list)
}
@Synchronized
fun removeDownloadLabel(raw: DownloadLabel?) {
suspend fun removeDownloadLabel(raw: DownloadLabel) {
val dao = db.downloadLabelDao()
dao.delete(raw!!)
dao.delete(raw)
}
suspend fun removeLocalFavorites(gid: Long) {
@@ -24,5 +24,5 @@ interface DownloadLabelDao {
fun insert(t: DownloadLabel): Long
@Delete
fun delete(downloadLabel: DownloadLabel)
suspend fun delete(downloadLabel: DownloadLabel)
}
@@ -769,7 +769,7 @@ object DownloadManager : OnSpiderListener {
}
}
fun deleteLabel(label: String) {
suspend fun deleteLabel(label: String) {
// Find in label list and remove
var found = false
val iterator = labelList.iterator()