feat: keep background Updates badge current (Closes #1281)
This commit is contained in:
1 parent
b18a50fec5
commit
05405bf2e8
11 files changed
+172
-12
No files matched your search
@@ -133,6 +133,7 @@ async def dispatch_unread_updates(
|
||||
for item in page.get("items", [])
|
||||
if isinstance(item, dict) and str(item.get("id", "")).isdigit()
|
||||
}
|
||||
unread_count = min(len(thread_revisions), 9999)
|
||||
await asyncio.to_thread(store.reconcile_unread, thread_revisions)
|
||||
deliveries = await asyncio.to_thread(store.claim_unseen, thread_revisions)
|
||||
if session_statuses is not None:
|
||||
@@ -201,6 +202,7 @@ async def dispatch_unread_updates(
|
||||
"route": f"#/my-work/update/{thread_id}",
|
||||
"tag": f"stackchain-update-{thread_id}",
|
||||
"notification_id": thread_id,
|
||||
"unread_count": unread_count,
|
||||
},
|
||||
separators=(",", ":"),
|
||||
)
|
||||
@@ -258,6 +260,7 @@ async def dispatch_unread_updates(
|
||||
"route": "#/my-work/updates",
|
||||
"tag": "stackchain-update-digest",
|
||||
"update_count": len(overflow_revisions),
|
||||
"unread_count": unread_count,
|
||||
},
|
||||
separators=(",", ":"),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user