mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 14:35:27 +00:00
Avoid opening compose box for topic sidebar clicks.
We don't want to auto-open the compose box for topic
sidebar clicks, because we want to convenience folks
reading messages, not writing messages, since on
stream narrows, people tend to do much more reading
than writing. (Also, opening the compose box explicitly
is super easy.)
The part of this change that affects behavior is that
we remove the call to compose_actions.start('stream').
Then the simplification is that we replace the checks
to narrowed_by_reply() and !narrowed_to_topic() with
a single call to narrowed_by_pm_reply().
Fixes #3886.
This commit is contained in:
@@ -375,10 +375,8 @@ exports.activate = function (raw_operators, opts) {
|
|||||||
$('#search_query').val(Filter.unparse(operators));
|
$('#search_query').val(Filter.unparse(operators));
|
||||||
search.update_button_visibility();
|
search.update_button_visibility();
|
||||||
|
|
||||||
if (!had_message_content && opts.trigger === 'sidebar' && exports.narrowed_by_reply()) {
|
if (!had_message_content) {
|
||||||
if (exports.narrowed_to_topic()) {
|
if (exports.narrowed_by_pm_reply() && (opts.trigger === 'sidebar')) {
|
||||||
compose_actions.start('stream');
|
|
||||||
} else {
|
|
||||||
compose_actions.start('private');
|
compose_actions.start('private');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user