You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improvement proposal: Discord style ping badge on community icons (& count replies as pings) #112
Problem
When someone mentions me or replies to me in a community, it's easy to miss. On the side rail the only signal is the thin edge bar next to the community icon switching from grey (unread) to the accent color (ping). DMs get a number badge there, communities don't (RailItem.svelte: "A community marks unread with its edge bar instead"). On themes where the accent is close to grey, the two bars look basically the same.
Replies also don't count as pings in the UI: countPingMessages() in src/js/render/chatlist/list.js only checks @me, @everyone & role pings. Meanwhile the notification side (reply_ping in subscription_handler.rs) does treat a reply to my msg as a mention. So a reply can ring my phone but leave no ping marker in the app.
Proposal
Discord style number badge on the community icon in the rail when there are pings. computeCommunityPingCount() is already computed in RailItem.svelte, it's just not rendered for communities. Keep the edge bar for plain unread
Count replies to my own msgs as pings in countPingMessages(), same rule the notification side uses (the replied to msg is mine)
Nice to have: same badge on rail folders (RailFolder.svelte already sums the pings)
Notes
Chat list rows already show a number for pings at the Mentions level, so this mostly brings the rail in line w/ it
countPingMessages() walks the msgs in RAM, while the unread count comes from the DB. Per the comment in computeRowBadgeCount(), after a restart only the last msg per chat is in RAM, so pings in channels I haven't opened yet may not count at all. Worth a look while in there
Activity