fix: clean up pop-out window when auto-tell tab is LRU-dropped

This commit is contained in:
2026-05-03 16:04:57 +02:00
parent ccf2ec9f12
commit f207239d56
2 changed files with 21 additions and 0 deletions
+16
View File
@@ -183,6 +183,22 @@ internal sealed class AutoTellTabsService : IDisposable
return;
}
// v0.6.1 — if the victim is currently popped out, tear down the
// matching Popout window first. Otherwise the window stays in
// PopOutWindows + WindowSystem and renders empty / re-spawns on the
// next AddPopOutsToDraw tick. Latent since pop-outs were introduced;
// becomes visible with AutoTellTabsOpenAsPopout where dropping a
// popped tab is now a routine code path.
if (victim.Tab.PopOut)
{
var popout = _plugin.ChatLogWindow.ActivePopouts
.FirstOrDefault(p => p.TabIdentifier == victim.Tab.Identifier);
if (popout != null)
{
popout.IsOpen = false;
}
}
Plugin.Config.Tabs.RemoveAt(victim.Index);
// Re-anchor the active tab so the user does not silently end up on