UX: update chat channel sorting (#28760)

Reverts chat channel sorting changes made in #28731 due to desktop sidebar.
This commit is contained in:
David Battersby 2024-09-05 20:58:15 +04:00 committed by GitHub
parent 9b630c8cca
commit a193bf4360
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,6 +20,7 @@ export default class ChatChannelsManager extends Service {
@service chatStateManager;
@service currentUser;
@service router;
@service site;
@service siteSettings;
@tracked _cached = new TrackedObject();
@ -129,7 +130,11 @@ export default class ChatChannelsManager extends Service {
channel.isCategoryChannel && channel.currentUserMembership.following
);
return this.#sortChannelsByActivity(channels);
if (this.site.mobileView) {
return this.#sortChannelsByActivity(channels);
} else {
return channels.sort((a, b) => a?.slug?.localeCompare?.(b?.slug));
}
}
@cached