recent_topics: Move from overlay to a narrow-like view.

Recent Topics is no longer an overlay now, but note that it is
also not a typical messages narrow. It can reside between
an overlay and a Filter in the sense that it is dispalyed as
a typical Filter narrow but has properties of an Overlay.

Compose box is not visible in this view as it will be confusing
to many users and hence compose shortcuts have also been disabled.

Keyboard shortcuts that apply on messages have also been disabled.

The remaining shortcuts that apply to a narrow are still accessible
here.
This commit is contained in:
Aman Agrawal
2020-07-05 15:49:09 +05:30
committed by Tim Abbott
parent 9ed3e47796
commit 1eafb1d8b3
19 changed files with 210 additions and 139 deletions

View File

@@ -768,7 +768,7 @@ function handle_post_narrow_deactivate_processes() {
message_scroll.update_top_of_narrow_notices(home_msg_list);
}
exports.deactivate = function () {
exports.deactivate = function (coming_from_recent_topics = false) {
// NOTE: Never call this function independently,
// always use hashchange.go_to_location("") to
// activate All message narrow.
@@ -785,7 +785,9 @@ exports.deactivate = function () {
home_msg_list in it.
*/
search.clear_search_form();
if (narrow_state.filter() === undefined) {
// Both All messages and Recent Topics have `undefined` filter.
// Return if already in the All message narrow.
if (narrow_state.filter() === undefined && !coming_from_recent_topics) {
return;
}
unnarrow_times = {start_time: new Date()};