Fixed some issues with folders not showing, adding empty folders to the list.

This commit is contained in:
CakeAndBanana
2025-09-16 21:06:15 +02:00
parent 5dce1977c7
commit 38a360bfee
3 changed files with 8 additions and 14 deletions

View File

@@ -549,7 +549,7 @@ public class CompactUi : WindowMediatorSubscriberBase
bool FilterNotTaggedUsers(KeyValuePair<Pair, List<GroupFullInfoDto>> u) bool FilterNotTaggedUsers(KeyValuePair<Pair, List<GroupFullInfoDto>> u)
=> u.Key.IsDirectlyPaired && !u.Key.IsOneSidedPair && !_tagHandler.HasAnyPairTag(u.Key.UserData.UID); => u.Key.IsDirectlyPaired && !u.Key.IsOneSidedPair && !_tagHandler.HasAnyPairTag(u.Key.UserData.UID);
bool FilterNotTaggedSyncshells(GroupFullInfoDto group) bool FilterNotTaggedSyncshells(GroupFullInfoDto group)
=> (!_tagHandler.HasAnySyncshellTag(group.GID) && !_configService.Current.ShowGroupedSyncshellsInAll) || true; => !_tagHandler.HasAnySyncshellTag(group.GID) || _configService.Current.ShowGroupedSyncshellsInAll;
bool FilterOfflineUsers(KeyValuePair<Pair, List<GroupFullInfoDto>> u) bool FilterOfflineUsers(KeyValuePair<Pair, List<GroupFullInfoDto>> u)
=> ((u.Key.IsDirectlyPaired && _configService.Current.ShowSyncshellOfflineUsersSeparately) => ((u.Key.IsDirectlyPaired && _configService.Current.ShowSyncshellOfflineUsersSeparately)
|| !_configService.Current.ShowSyncshellOfflineUsersSeparately) || !_configService.Current.ShowSyncshellOfflineUsersSeparately)
@@ -607,12 +607,8 @@ public class CompactUi : WindowMediatorSubscriberBase
syncshellFolderTags.Add(_drawEntityFactory.CreateDrawGroupFolder($"tag_{group.GID}", group, filteredGroupPairs, allGroupPairs)); syncshellFolderTags.Add(_drawEntityFactory.CreateDrawGroupFolder($"tag_{group.GID}", group, filteredGroupPairs, allGroupPairs));
} }
} }
if (syncshellFolderTags.Count > 0)
{
drawFolders.Add(new DrawGroupedGroupFolder(syncshellFolderTags, _tagHandler, _uiSharedService, _selectSyncshellForTagUi, _renameSyncshellTagUi, syncshelltag)); drawFolders.Add(new DrawGroupedGroupFolder(syncshellFolderTags, _tagHandler, _uiSharedService, _selectSyncshellForTagUi, _renameSyncshellTagUi, syncshelltag));
} }
}
var allOnlineNotTaggedPairs = ImmutablePairList(allPairs var allOnlineNotTaggedPairs = ImmutablePairList(allPairs
.Where(FilterNotTaggedUsers)); .Where(FilterNotTaggedUsers));

View File

@@ -34,8 +34,6 @@ public class DrawGroupedGroupFolder : IDrawFolder
public void Draw() public void Draw()
{ {
if (!_groups.Any()) return;
string _id = "__folder_syncshells"; string _id = "__folder_syncshells";
if (_tag != "") if (_tag != "")
{ {

View File

@@ -1145,12 +1145,12 @@ public class SettingsUi : WindowMediatorSubscriberBase
} }
_uiShared.DrawHelpText("This will group up all Syncshells in a special 'All Syncshells' folder in the main UI."); _uiShared.DrawHelpText("This will group up all Syncshells in a special 'All Syncshells' folder in the main UI.");
//if (ImGui.Checkbox("Show grouped syncshells in main screen/all syncshells", ref groupedSyncshells)) if (ImGui.Checkbox("Show grouped syncshells in main screen/all syncshells", ref groupedSyncshells))
//{ {
// _configService.Current.ShowGroupedSyncshellsInAll = groupedSyncshells; _configService.Current.ShowGroupedSyncshellsInAll = groupedSyncshells;
// _configService.Save(); _configService.Save();
// Mediator.Publish(new RefreshUiMessage()); Mediator.Publish(new RefreshUiMessage());
//} }
_uiShared.DrawHelpText("This will show grouped syncshells in main screen or group 'All Syncshells'."); _uiShared.DrawHelpText("This will show grouped syncshells in main screen or group 'All Syncshells'.");
if (ImGui.Checkbox("Show player name for visible players", ref showNameInsteadOfNotes)) if (ImGui.Checkbox("Show player name for visible players", ref showNameInsteadOfNotes))