fix(tabs): pin indicator, history preload, drop Promote from temp menu
Smoke-test round 2 feedback from Jin: - Promote-to-permanent label "Dauerhaft behalten" was indistinguishable from Pin in German, leading to misclicks that dropped the tell-target. Removed the menu entry from TempTabs entirely — Promote stays as a service method for future use, but the user-facing path is gone. Anyone who wants a regular tab can still create one via the existing "neuen Tab anlegen" flow. - No visual confirmation that pin took effect. Added a FontAwesome thumbtack overlay top-left of the sidebar icon, accent-coloured, and appended a "Pinned — survives relog" line to the hover tooltip. - Pinned tabs came back empty after a full disable/enable cycle because Tab.Messages is NonSerialized. RehydratePinnedTabs now also runs the same MessageStore-backed PreloadHistory the spawn path uses, so the recent conversation window reappears alongside the rehydrated TellTarget. Diagnose-logging on TryPin/Unpin/Promote/Rehydrate stays in so the next smoke can confirm at a glance which path fired from the Dalamud console.
This commit is contained in:
@@ -1871,11 +1871,34 @@ public sealed class ChatLogWindow : Window
|
||||
);
|
||||
}
|
||||
|
||||
// Pin indicator: small thumbtack glyph top-left of the icon.
|
||||
// Sits opposite the unread dot so they never collide.
|
||||
if (tab.IsPinned)
|
||||
{
|
||||
var min = ImGui.GetItemRectMin();
|
||||
const float pinPadding = 2f;
|
||||
var pinPos = new Vector2(min.X + pinPadding, min.Y + pinPadding);
|
||||
using (Plugin.FontManager.FontAwesome.Push())
|
||||
{
|
||||
ImGui
|
||||
.GetWindowDrawList()
|
||||
.AddText(
|
||||
pinPos,
|
||||
ColourUtil.RgbaToAbgr(theme.Colors.Accent),
|
||||
FontAwesomeIcon.Thumbtack.ToIconString()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Tooltip mit Tab-Name + Unread-Counter beim Hover.
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
using var tt = ImRaii.Tooltip();
|
||||
ImGui.TextUnformatted($"{tab.Name}{unread}");
|
||||
if (tab.IsPinned)
|
||||
{
|
||||
ImGui.TextUnformatted(HellionStrings.PinTab_PinnedTooltip);
|
||||
}
|
||||
}
|
||||
|
||||
DrawTabContextMenu(tab, tabI);
|
||||
@@ -2182,22 +2205,18 @@ public sealed class ChatLogWindow : Window
|
||||
if (svc.TryPin(tab))
|
||||
ImGui.CloseCurrentPopup();
|
||||
}
|
||||
if (atCap && ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
|
||||
if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
|
||||
{
|
||||
ImGui.SetTooltip(
|
||||
string.Format(
|
||||
HellionStrings.PinTab_LimitReached,
|
||||
AutoTellTabsService.MaxPinnedTempTabs
|
||||
)
|
||||
atCap
|
||||
? string.Format(
|
||||
HellionStrings.PinTab_LimitReached,
|
||||
AutoTellTabsService.MaxPinnedTempTabs
|
||||
)
|
||||
: HellionStrings.PinTab_PinTooltip
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (ImGui.MenuItem(HellionStrings.PinTab_MenuPromote))
|
||||
{
|
||||
svc.PromoteToPermanent(tab);
|
||||
ImGui.CloseCurrentPopup();
|
||||
}
|
||||
if (ImGui.IsItemHovered())
|
||||
ImGui.SetTooltip(HellionStrings.PinTab_PromoteTooltip);
|
||||
}
|
||||
|
||||
internal readonly List<bool> PopOutDocked = [];
|
||||
|
||||
Reference in New Issue
Block a user