From 0c923a90db8a6601b7f57a4b39450d76831620cb Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Wed, 12 Jun 2024 17:18:49 -0700 Subject: [PATCH] Fix bug fetching unread count for single feed. --- ArticlesDatabase/Sources/ArticlesDatabase/ArticlesTable.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArticlesDatabase/Sources/ArticlesDatabase/ArticlesTable.swift b/ArticlesDatabase/Sources/ArticlesDatabase/ArticlesTable.swift index 5819078cd..c3c9e0755 100644 --- a/ArticlesDatabase/Sources/ArticlesDatabase/ArticlesTable.swift +++ b/ArticlesDatabase/Sources/ArticlesDatabase/ArticlesTable.swift @@ -153,7 +153,7 @@ final class ArticlesTable { func unreadCount(feedID: String, database: FMDatabase) -> Int? { let sql = "select count(*) from articles natural join statuses where feedID=? and read=0;" - let unreadCount = database.count(sql: sql, parameters: nil, tableName: name) + let unreadCount = database.count(sql: sql, parameters: [feedID], tableName: name) return unreadCount }