From 79488fdaab95d69f8a43f51fe4dd1ef012cfe696 Mon Sep 17 00:00:00 2001 From: Infi Date: Wed, 17 Apr 2024 22:45:29 +0200 Subject: [PATCH] Set channel on tab switch --- ChatTwo/Ui/ChatLogWindow.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ChatTwo/Ui/ChatLogWindow.cs b/ChatTwo/Ui/ChatLogWindow.cs index 6e4c7d9..b6ea0e6 100644 --- a/ChatTwo/Ui/ChatLogWindow.cs +++ b/ChatTwo/Ui/ChatLogWindow.cs @@ -1036,6 +1036,9 @@ public sealed class ChatLogWindow : Window, IUiComponent LastTab = tabI; tab.Unread = 0; + if (switchedTab && tab.Channel.HasValue) + SetChannel(tab.Channel.Value); + DrawMessageLog(tab, PayloadHandler, GetRemainingHeightForMessageLog(), switchedTab); ImGui.EndTabItem(); @@ -1078,6 +1081,9 @@ public sealed class ChatLogWindow : Window, IUiComponent currentTab = tabI; switchedTab = LastTab != tabI; LastTab = tabI; + + if (switchedTab && tab.Channel.HasValue) + SetChannel(tab.Channel.Value); } }