Don't query unread counts if database is suspended

This commit is contained in:
Maurice Parker 2019-12-07 16:57:21 -07:00
parent a75ce688d9
commit 0759c303cc

View File

@ -329,7 +329,7 @@ final class ArticlesTable: DatabaseTable {
func fetchUnreadCount(_ webFeedIDs: Set<String>, _ since: Date, _ callback: @escaping (Int) -> Void) {
// Get unread count for today, for instance.
if webFeedIDs.isEmpty {
if webFeedIDs.isEmpty || queue.isSuspended {
callback(0)
return
}