[MM-28706] revert ordering change for in: autosuggest search (#4818)
Summary: Revert ordering change for in: auto-suggest search after user feedback. The ordering now is Public Channels, Private Channels, and finally DMs and GMs. This PR only fixes ordering. Further search improvements are planned in https://mattermost.atlassian.net/browse/MM-26805 Ticket Link: https://mattermost.atlassian.net/browse/MM-28706 The Jira ticket above reverts the changes in https://mattermost.atlassian.net/browse/MM-27540 (Parent: https://mattermost.atlassian.net/browse/MM-15477) which was implemented in #4704
This commit is contained in:
parent
b6fbcf2e7c
commit
99f018faac
1 changed files with 11 additions and 11 deletions
|
|
@ -91,12 +91,13 @@ export default class ChannelMention extends PureComponent {
|
|||
myMembers !== this.props.myMembers)) {
|
||||
const sections = [];
|
||||
if (isSearch) {
|
||||
if (directAndGroupMessages.length) {
|
||||
if (publicChannels.length) {
|
||||
sections.push({
|
||||
id: t('suggestion.search.direct'),
|
||||
defaultMessage: 'Direct Messages',
|
||||
data: directAndGroupMessages,
|
||||
key: 'directAndGroupMessages',
|
||||
id: t('suggestion.search.public'),
|
||||
defaultMessage: 'Public Channels',
|
||||
data: publicChannels.filter((cId) => myMembers[cId]),
|
||||
key: 'publicChannels',
|
||||
hideLoadingIndicator: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -110,13 +111,12 @@ export default class ChannelMention extends PureComponent {
|
|||
});
|
||||
}
|
||||
|
||||
if (publicChannels.length) {
|
||||
if (directAndGroupMessages.length) {
|
||||
sections.push({
|
||||
id: t('suggestion.search.public'),
|
||||
defaultMessage: 'Public Channels',
|
||||
data: publicChannels.filter((cId) => myMembers[cId]),
|
||||
key: 'publicChannels',
|
||||
hideLoadingIndicator: true,
|
||||
id: t('suggestion.search.direct'),
|
||||
defaultMessage: 'Direct Messages',
|
||||
data: directAndGroupMessages,
|
||||
key: 'directAndGroupMessages',
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue