Fix the downloader for using Realm native

This commit is contained in:
ronaldheft
2022-08-14 22:20:24 -04:00
parent 4c8217edf6
commit 5d31499fd6
3 changed files with 67 additions and 42 deletions
-5
View File
@@ -164,11 +164,6 @@ class Database {
return try! realm.write { realm.add(downloadItem, update: .modified) }
}
public func updateDownloadItemPart(_ part: DownloadItemPart) {
let realm = try! Realm()
return try! realm.write { realm.add(part, update: .modified) }
}
public func removeDownloadItem(_ downloadItem: DownloadItem) {
let realm = try! Realm()
return try! realm.write { realm.delete(downloadItem) }