Prioritize in: autocomplete results based on current channel and recently viewed

Description

Repro: Type "in:" in the search input field

Observed: server returns all channels on the team ordered alphabetically, in public, private and direct message sections.

Expected: Remove the "Public Channels" "Private Channels" and "Direct Messages" headings and combine all channel types in the list based on the below sorting criteria. Show a maximum of 20 results that match the search criteria in the following order:

A) First, show the current channel
B) Next, show Channels or Direct Messages that have a last_viewed_at time (with sorting by most recent first)
C) Next, show all other channels in the team (sorting alphabetical)

Note: Can this be done as a hybrid client-server approach so the local results of the users are returned immediately and then the server results are added after

QA Test Steps

None

Mana

None

Assignee

Unassigned

QA Assignee

None

Reporter

Eric Sethna

Fix versions

Mattermost Team

Platform

Sprint

None

QA Testing Areas

None

GitHub Issue

None

Components

None
Configure