Hide offline users in syncshells with over 1k members

This commit is contained in:
Loporrit
2025-02-18 12:38:15 +00:00
parent 30041e0663
commit 99c293d89f

View File

@@ -19,6 +19,7 @@ using MareSynchronos.UI.Handlers;
using Dalamud.Interface.Utility;
using MareSynchronos.Services;
using MareSynchronos.MareConfiguration;
using Dalamud.Interface.Colors;
namespace MareSynchronos.UI;
@@ -410,6 +411,8 @@ internal sealed class GroupPanel
ImGui.EndPopup();
}
bool hideOfflineUsers = pairsInGroup.Count > 1000;
ImGui.Indent(20);
if (_expandedGroupState[groupDto.GID])
{
@@ -460,8 +463,15 @@ internal sealed class GroupPanel
{
ImGui.TextUnformatted("Offline/Unknown");
ImGui.Separator();
if (hideOfflineUsers)
{
UiSharedService.ColorText($" {offlineUsers.Count} users omitted from display.", ImGuiColors.DalamudGrey);
}
else
{
_uidDisplayHandler.RenderPairList(offlineUsers);
}
}
ImGui.Separator();
}