Skip to content

Fix: Fixed issue where grouping by tags wouldn't show all items #11909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ private void AddItemsToGroup(IEnumerable<T> items, CancellationToken token = def

var key = GetGroupKeyForItem(item);
if (key is null)
return;
continue;

var groups = GroupedCollection?.Where(x => x.Model.Key == key);
if (item is IGroupableItem groupable)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static Func<ListedItem, string> GetItemGroupKeySelector(GroupOption optio
GroupOption.DateModified => x => dateTimeFormatter.ToTimeSpanLabel(x.ItemDateModifiedReal).Text,
GroupOption.FileType => x => x.PrimaryItemAttribute == StorageItemTypes.Folder && !x.IsShortcut ? x.ItemType : x.FileExtension?.ToLowerInvariant() ?? " ",
GroupOption.SyncStatus => x => x.SyncStatusString,
GroupOption.FileTag => x => x.FileTags?.FirstOrDefault(),
GroupOption.FileTag => x => x.FileTags?.FirstOrDefault() ?? "Untagged",
GroupOption.OriginalFolder => x => (x as RecycleBinItem)?.ItemOriginalFolder,
GroupOption.DateDeleted => x => dateTimeFormatter.ToTimeSpanLabel((x as RecycleBinItem)?.ItemDateDeletedReal ?? DateTimeOffset.Now).Text,
GroupOption.FolderPath => x => PathNormalization.GetParentDir(x.ItemPath.TrimPath()),
Expand Down Expand Up @@ -94,9 +94,9 @@ public static (Action<GroupedCollection<ListedItem>>, Action<GroupedCollection<L

GroupOption.FileTag => (x =>
{
ListedItem first = x.First();
ListedItem first = x.FirstOrDefault();
x.Model.ShowCountTextBelow = true;
x.Model.Text = first.FileTagsUI?.FirstOrDefault()?.Name ?? "None".GetLocalizedResource();
x.Model.Text = first.FileTagsUI?.FirstOrDefault()?.Name ?? "Untagged".GetLocalizedResource();
//x.Model.Icon = first.FileTagsUI?.FirstOrDefault()?.Color;
}, null),

Expand Down
3 changes: 3 additions & 0 deletions src/Files.App/Strings/en-US/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -2854,4 +2854,7 @@
<data name="ShowFileExtensionWarning" xml:space="preserve">
<value>Show warning when changing file extensions</value>
</data>
<data name="Untagged" xml:space="preserve">
<value>Untagged</value>
</data>
</root>