Radish alpha
r
Radicle desktop app
Radicle
Git (anonymous pull)
Log in to clone via SSH
Fix wrong inbox notification counters
✓ CI success Rūdolfs Ošiņš committed 1 year ago
commit 01d4c0c5b7ca76d6104a67fd21e558ae3f4e74c3
parent 5cb9aaa7fba01da40b4255ea25017099ab344c22
1 passed (1 total) View logs
1 file changed +2 -2
modified crates/radicle-types/src/outbound/sqlite.rs
@@ -118,9 +118,9 @@ impl InboxStorage for Sqlite {
        notification::ListNotificationsError,
    > {
        let stmt = self.db.prepare(
-
            "SELECT ref, repo, COUNT(*) as count
+
            "SELECT COUNT(DISTINCT substr(ref, 66)) count, ref, repo
                 FROM `repository-notifications`
-
                 WHERE ref LIKE '%cobs%'
+
                 WHERE new NOT NULL AND (ref LIKE '%cobs/xyz.radicle.patch%' OR ref LIKE '%cobs/xyz.radicle.issue%')
                 GROUP BY repo",
        )?;