Skip to content

Commit

Permalink
Fix Some Group Filter Jank
Browse files Browse the repository at this point in the history
  • Loading branch information
da3dsoul committed Dec 17, 2023
1 parent ed49b6e commit c94dccc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Shoko.Commons
Submodule Shoko.Commons updated 1 files
+1 −1 Shoko.Models
2 changes: 1 addition & 1 deletion Shoko.Desktop/ViewModel/Server/VM_GroupFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ public bool HasGroupChilds()

public List<IListWrapper> GetDirectChildren()
{
Childs = Childs ?? new HashSet<int>(); //Hack around ASP Nulls.
Childs ??= new HashSet<int>(); //Hack around ASP Nulls.
List<IListWrapper> wrappers = new List<IListWrapper>();

VM_AnimeGroup_User.SortMethod = AnimeGroupSortMethod.SortName;
Expand Down
16 changes: 2 additions & 14 deletions Shoko.Desktop/ViewModel/VM_MainListHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -763,23 +763,11 @@ public void UpdateAll()
}

//Update Group Filters
foreach (int gfr in changes.Filters.RemovedItems)
{
AllGroupFiltersDictionary.Remove(gfr);
}
AllGroupFiltersDictionary.Clear();

foreach (VM_GroupFilter gf in changes.Filters.ChangedItems.CastList<VM_GroupFilter>())
{
VM_GroupFilter v;

if (AllGroupFiltersDictionary.TryGetValue(gf.GroupFilterID, out v))
{
v.Populate(gf);
}
else
{
AllGroupFiltersDictionary[gf.GroupFilterID] = gf;
}
AllGroupFiltersDictionary[gf.GroupFilterID] = gf;
}

foreach (int gf in changes.Filters.ChangedItems.Select(a => a.GroupFilterID))
Expand Down

0 comments on commit c94dccc

Please sign in to comment.