mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 11:23:25 +08:00
UX: update chat channel sorting (#28760)
Reverts chat channel sorting changes made in #28731 due to desktop sidebar.
This commit is contained in:
parent
9b630c8cca
commit
a193bf4360
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user