Skip to content

Commit

Permalink
Fix AOT Crash for LandingPages
Browse files Browse the repository at this point in the history
  • Loading branch information
ghost1372 committed Nov 25, 2024
1 parent 8ba88f4 commit b9962f6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions dev/DevWinUI.Controls/LandingPages/AllLandingPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,23 +109,23 @@ public void OrderBy(Func<DataItem, object> orderby = null)
{
if (orderby != null)
{
Items = Items?.OrderBy(orderby).ToList();
Items = Items?.OrderBy(orderby)?.ToList();
}
else
{
Items = Items?.OrderBy(i => i.Title).ToList();
Items = Items?.OrderBy(i => i.Title)?.ToList();
}
}

public void OrderByDescending(Func<DataItem, object> orderByDescending = null)
{
if (orderByDescending != null)
{
Items = Items?.OrderByDescending(orderByDescending).ToList();
Items = Items?.OrderByDescending(orderByDescending)?.ToList();
}
else
{
Items = Items?.OrderByDescending(i => i.Title).ToList();
Items = Items?.OrderByDescending(i => i.Title)?.ToList();
}
}
}
8 changes: 4 additions & 4 deletions dev/DevWinUI.Controls/LandingPages/MainLandingPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,23 +193,23 @@ public void OrderBy(Func<DataItem, object> orderby = null)
{
if (orderby != null)
{
Items = Items?.OrderBy(orderby).ToList();
Items = Items?.OrderBy(orderby)?.ToList();
}
else
{
Items = Items?.OrderBy(i => i.Title).ToList();
Items = Items?.OrderBy(i => i.Title)?.ToList();
}
}

public void OrderByDescending(Func<DataItem, object> orderByDescending = null)
{
if (orderByDescending != null)
{
Items = Items?.OrderByDescending(orderByDescending).ToList();
Items = Items?.OrderByDescending(orderByDescending)?.ToList();
}
else
{
Items = Items?.OrderByDescending(i => i.Title).ToList();
Items = Items?.OrderByDescending(i => i.Title)?.ToList();
}
}

Expand Down
8 changes: 4 additions & 4 deletions dev/DevWinUI.Controls/LandingPages/SectionPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ public void OrderBy(Func<DataItem, object> orderby = null)
{
if (orderby != null)
{
Items = Items?.OrderBy(orderby);
Items = Items?.OrderBy(orderby)?.ToList();
}
else
{
Items = Items?.OrderBy(i => i.Title);
Items = Items?.OrderBy(i => i.Title)?.ToList();
}
}

public void OrderByDescending(Func<DataItem, object> orderByDescending = null)
{
if (orderByDescending != null)
{
Items = Items?.OrderByDescending(orderByDescending);
Items = Items?.OrderByDescending(orderByDescending)?.ToList();
}
else
{
Items = Items?.OrderByDescending(i => i.Title);
Items = Items?.OrderByDescending(i => i.Title)?.ToList();
}
}

Expand Down

0 comments on commit b9962f6

Please sign in to comment.