mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-27 06:46:52 +00:00
Fix crashing bug caused by nesting update statements.
This commit is contained in:
1 parent
be81fdae0a
commit
d289bbea94
2 files changed
+10
-8
No files matched your search
@@ -50,7 +50,7 @@ final class StatusesTable: DatabaseTable {
|
||||
|
||||
// MARK: Marking
|
||||
|
||||
func mark(_ statuses: Set<ArticleStatus>, _ statusKey: ArticleStatus.Key, _ flag: Bool) -> Set<ArticleStatus>? {
|
||||
func mark(_ statuses: Set<ArticleStatus>, _ statusKey: ArticleStatus.Key, _ flag: Bool, _ database: FMDatabase) -> Set<ArticleStatus>? {
|
||||
|
||||
// Sets flag in both memory and in database.
|
||||
|
||||
@@ -70,9 +70,8 @@ final class StatusesTable: DatabaseTable {
|
||||
}
|
||||
let articleIDs = updatedStatuses.articleIDs()
|
||||
|
||||
queue.updateSync { (database) in
|
||||
self.markArticleIDs(articleIDs, statusKey, flag, database)
|
||||
}
|
||||
self.markArticleIDs(articleIDs, statusKey, flag, database)
|
||||
|
||||
return updatedStatuses
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user