()
| 531 | * Used to drive the red-dot badge on Profile / Settings menus. |
| 532 | */ |
| 533 | export async function getUnreadFeedbackCount(): Promise<number> { |
| 534 | const db = await getDB(); |
| 535 | const rows = await db.select<{ count: number }>( |
| 536 | "SELECT COUNT(*) as count FROM feedback WHERE has_new_reply = 1", |
| 537 | ); |
| 538 | return rows[0]?.count ?? 0; |
| 539 | } |
| 540 | |
| 541 | /** |
| 542 | * Refresh feedback status from the worker for all locally-known issues, then |
no test coverage detected