Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
[MM-28706] revert ordering change for in: auto-suggest search resul…
Browse files Browse the repository at this point in the history
…ts (#6493) (#6556)

Summary:
Revert ordering change for in: auto-suggest search results after user feedback. The ordering now is Public Channels, Private Channels, and finally DMs and GMs.

Ticket Link:
https://mattermost.atlassian.net/browse/MM-28706
The Jira ticket above reverts the changes in https://mattermost.atlassian.net/browse/MM-26958 (Parent: https://mattermost.atlassian.net/browse/MM-15477) which was implemented in #5919

(cherry picked from commit 3889508)

Co-authored-by: Ashish Bhate <[email protected]>
  • Loading branch information
mattermost-build and ashishbhate committed Sep 25, 2020
1 parent bcb5619 commit 8620395
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/suggestion/search_channel_provider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default class SearchChannelProvider extends Provider {
//
// MM-12677 When this is migrated this needs to be fixed to pull the user's locale
//
channels = channels.sort(sortChannelsByTypeListAndDisplayName.bind(null, 'en', [Constants.DM_CHANNEL, Constants.GM_CHANNEL, Constants.PRIVATE_CHANNEL, Constants.OPEN_CHANNEL]));
channels = channels.sort(sortChannelsByTypeListAndDisplayName.bind(null, 'en', [Constants.OPEN_CHANNEL, Constants.PRIVATE_CHANNEL, Constants.DM_CHANNEL, Constants.GM_CHANNEL]));
const channelNames = channels.map(itemToTerm.bind(null, isAtSearch));

resultsCallback({
Expand Down

0 comments on commit 8620395

Please sign in to comment.