optimize file scanner, fix unban in banui, show syncshell notes in standalone profile ui

This commit is contained in:
rootdarkarchon
2023-08-27 15:24:01 +02:00
parent d50d9cdf0f
commit a5aff6ba1a
5 changed files with 105 additions and 75 deletions

View File

@@ -319,7 +319,7 @@ internal sealed class GroupPanel
ImGui.TableNextColumn();
UiSharedService.TextWrapped(bannedUser.Reason);
ImGui.TableNextColumn();
if (UiSharedService.IconTextButton(FontAwesomeIcon.Check, "Unban"))
if (UiSharedService.IconTextButton(FontAwesomeIcon.Check, "Unban#" + bannedUser.UID))
{
_ = ApiController.GroupUnbanUser(bannedUser);
_bannedUsers.RemoveAll(b => string.Equals(b.UID, bannedUser.UID, StringComparison.Ordinal));

View File

@@ -140,9 +140,11 @@ public class StandaloneProfileUi : WindowMediatorSubscriberBase
if (Pair.GroupPair.Any())
{
ImGui.TextUnformatted("Paired through Syncshells:");
foreach (var groupPair in Pair.GroupPair)
foreach (var groupPair in Pair.GroupPair.Select(k => k.Key))
{
ImGui.TextUnformatted("- " + groupPair.Key.GroupAliasOrGID);
var groupNote = _serverManager.GetNoteForGid(groupPair.GID);
var groupString = string.IsNullOrEmpty(groupNote) ? groupPair.GroupAliasOrGID : $"{groupNote} ({groupPair.GroupAliasOrGID})";
ImGui.TextUnformatted("- " + groupString);
}
}