fix(unread): restore the tab unread badge and fix the post-F2 unread decision
The v1.8.x sidebar/top-bar rebuild never re-rendered the unread dot, so inactive tabs showed no badge even though the counter was tracked. Draw it again top-right of the tab icon in both Sidebar and TopTabBar, gated on !active && UnreadMode != None && Unread > 0, and zero the active tab's counter every frame (1.5.6 convention) so the dot only ever shows on tabs you are not looking at. The unread decision moves to MessageManager.ShouldCountUnread and snapshots the active tab + whether it shows the message once before the loop: Unseen suppresses unread on an inactive tab only when the active (real, post-F2) tab also shows that message. Adds SidebarUnreadDotStep (render) and UnreadDecisionStep (decision) self-tests (step count 32 -> 34).
This commit is contained in:
@@ -192,6 +192,12 @@ internal sealed class MainWindow : Window
|
||||
TabLifecycleHelpers.OnTabActivated(reseed, active);
|
||||
}
|
||||
|
||||
// The active tab's messages are on screen, so it carries no unread badge
|
||||
// (1.5.6 convention: zero the current tab every frame so the dot only ever
|
||||
// shows on tabs you are NOT looking at).
|
||||
if (_activeTab is { } seenTab)
|
||||
seenTab.Unread = 0;
|
||||
|
||||
var statusHeight = Components.StatusBar.Height;
|
||||
|
||||
using (var body = ImRaii.Child("##hellion-body", new Vector2(-1f, -statusHeight)))
|
||||
|
||||
Reference in New Issue
Block a user