- Sort rows in the database by date
- Add fast buttons to add/remove all channels
This commit is contained in:
@@ -535,6 +535,7 @@ internal class MessageStore : IDisposable
|
|||||||
ExtraChatChannel
|
ExtraChatChannel
|
||||||
FROM messages
|
FROM messages
|
||||||
" + whereClause + @"
|
" + whereClause + @"
|
||||||
|
ORDER BY Date
|
||||||
LIMIT $Offset, $OffsetCount;
|
LIMIT $Offset, $OffsetCount;
|
||||||
";
|
";
|
||||||
cmd.CommandTimeout = 120; // this could take a while on slow computers
|
cmd.CommandTimeout = 120; // this could take a while on slow computers
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ using Dalamud.Interface.Utility.Raii;
|
|||||||
using Dalamud.Interface.Windowing;
|
using Dalamud.Interface.Windowing;
|
||||||
using Dalamud.Bindings.ImGui;
|
using Dalamud.Bindings.ImGui;
|
||||||
using Dalamud.Game.Text.SeStringHandling.Payloads;
|
using Dalamud.Game.Text.SeStringHandling.Payloads;
|
||||||
|
using Dalamud.Interface.Components;
|
||||||
using Dalamud.Interface.ImGuiNotification;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Lumina.Data.Files;
|
using Lumina.Data.Files;
|
||||||
using Lumina.Text.ReadOnly;
|
using Lumina.Text.ReadOnly;
|
||||||
@@ -294,6 +295,30 @@ public class DbViewer : Window
|
|||||||
|
|
||||||
foreach (var (header, types) in ChatTypeExt.SortOrder)
|
foreach (var (header, types) in ChatTypeExt.SortOrder)
|
||||||
{
|
{
|
||||||
|
using var pushedId = ImRaii.PushId(header);
|
||||||
|
|
||||||
|
if (ImGuiComponents.IconButton(FontAwesomeIcon.Check))
|
||||||
|
{
|
||||||
|
foreach (var type in types)
|
||||||
|
SelectedChannels.TryAdd(type, (ChatSourceExt.All, ChatSourceExt.All));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImGui.IsItemHovered())
|
||||||
|
ImGui.SetTooltip("Select all");
|
||||||
|
|
||||||
|
ImGui.SameLine();
|
||||||
|
|
||||||
|
if (ImGuiComponents.IconButton(FontAwesomeIcon.Times))
|
||||||
|
{
|
||||||
|
foreach (var type in types)
|
||||||
|
SelectedChannels.Remove(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImGui.IsItemHovered())
|
||||||
|
ImGui.SetTooltip("Unselect all");
|
||||||
|
|
||||||
|
ImGui.SameLine();
|
||||||
|
|
||||||
using var headerNode = ImRaii.TreeNode(header);
|
using var headerNode = ImRaii.TreeNode(header);
|
||||||
if (!headerNode.Success)
|
if (!headerNode.Success)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -550,6 +550,30 @@ internal static class ImGuiUtil
|
|||||||
|
|
||||||
foreach (var (header, types) in ChatTypeExt.SortOrder)
|
foreach (var (header, types) in ChatTypeExt.SortOrder)
|
||||||
{
|
{
|
||||||
|
using var pushedId = ImRaii.PushId(header);
|
||||||
|
|
||||||
|
if (ImGuiComponents.IconButton(FontAwesomeIcon.Check))
|
||||||
|
{
|
||||||
|
foreach (var type in types)
|
||||||
|
chatCodes.TryAdd(type, (ChatSourceExt.All, ChatSourceExt.All));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImGui.IsItemHovered())
|
||||||
|
ImGui.SetTooltip("Select all");
|
||||||
|
|
||||||
|
ImGui.SameLine();
|
||||||
|
|
||||||
|
if (ImGuiComponents.IconButton(FontAwesomeIcon.Times))
|
||||||
|
{
|
||||||
|
foreach (var type in types)
|
||||||
|
chatCodes.Remove(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImGui.IsItemHovered())
|
||||||
|
ImGui.SetTooltip("Unselect all");
|
||||||
|
|
||||||
|
ImGui.SameLine();
|
||||||
|
|
||||||
using var headerNode = ImRaii.TreeNode(header);
|
using var headerNode = ImRaii.TreeNode(header);
|
||||||
if (!headerNode.Success)
|
if (!headerNode.Success)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user