feat: autohide improvements
- Adds new setting "Enable inactivity hide during battle" (default: true) which determines whether autohide should apply during battle (thanks @aurieh) - Adds new setting "Chat channels considered for activity" which allows customizing which channels incoming messages must match to "bump" the inactivity timer - Adds new per-tab setting "Unhide the chat window on activity" to configure whether it will be considered for "bumping" the inactivity timer when receiving messages that match the new channel filter. Note that the foreground tab is currently always considered. - Extends autohide code to apply to poped-out tabs as well. Each popout window has its own inactivity timer, but focusing the main window will restore all popped out windows. Co-authored-by: Auri <me@aurieh.me>
This commit is contained in:
@@ -4,6 +4,14 @@ using ChatTwo.Resources;
|
||||
namespace ChatTwo.Util;
|
||||
|
||||
internal static class TabsUtil {
|
||||
internal static Dictionary<ChatType, ChatSource> AllChannels()
|
||||
{
|
||||
var channels = new Dictionary<ChatType, ChatSource>();
|
||||
foreach (var chatType in Enum.GetValues<ChatType>())
|
||||
channels[chatType] = ChatSourceExt.All;
|
||||
return channels;
|
||||
}
|
||||
|
||||
internal static Tab VanillaGeneral => new() {
|
||||
Name = Language.Tabs_Presets_General,
|
||||
ChatCodes = new Dictionary<ChatType, ChatSource> {
|
||||
|
||||
Reference in New Issue
Block a user