feat(bot): change message count sorting (#514)

This commit is contained in:
rladenson 2023-01-19 14:11:25 -07:00 committed by Iris System
parent 10af7be278
commit 67376be123

View File

@ -122,7 +122,7 @@ public static class ListOptionsExt
.OrderByDescending(m => m.MetadataPrivacy.CanAccess(ctx)) .OrderByDescending(m => m.MetadataPrivacy.CanAccess(ctx))
.ThenBy(m => m.MetadataPrivacy.Get(ctx, m.Created, default), ReverseMaybe(Comparer<Instant>.Default)), .ThenBy(m => m.MetadataPrivacy.Get(ctx, m.Created, default), ReverseMaybe(Comparer<Instant>.Default)),
SortProperty.MessageCount => input SortProperty.MessageCount => input
.OrderByDescending(m => m.MessageCount != 0 && m.MetadataPrivacy.CanAccess(ctx)) .OrderByDescending(m => m.MetadataPrivacy.CanAccess(ctx))
.ThenByDescending(m => m.MetadataPrivacy.Get(ctx, m.MessageCount, 0), ReverseMaybe(Comparer<int>.Default)), .ThenByDescending(m => m.MetadataPrivacy.Get(ctx, m.MessageCount, 0), ReverseMaybe(Comparer<int>.Default)),
SortProperty.DisplayName => input SortProperty.DisplayName => input
.OrderByDescending(m => m.DisplayName != null && m.NamePrivacy.CanAccess(ctx)) .OrderByDescending(m => m.DisplayName != null && m.NamePrivacy.CanAccess(ctx))