mirror of https://github.com/zulip/zulip.git
Make c/C compose to a new destination instead of being identical to r/R
R means "I want to send a PM, you can guess the destination" r means "I want send a stream message, you can guess the destination" C means "I want to send a PM and specify the destination" c means "I want to send a stream message and specify the destination" (imported from commit 4c93cc3029892c21accadd9624da70ee818dec68)
This commit is contained in:
parent
da3f1704ed
commit
2cd7c35875
|
@ -205,6 +205,12 @@ exports.start = function (msg_type, opts) {
|
||||||
$('.message_comp').show();
|
$('.message_comp').show();
|
||||||
|
|
||||||
opts = fill_in_opts_from_current_narrowed_view(msg_type, opts);
|
opts = fill_in_opts_from_current_narrowed_view(msg_type, opts);
|
||||||
|
// If we are invoked by a compose hotkey (c or C), do not assume that we know
|
||||||
|
// what the message's topic or PM recipient should be.
|
||||||
|
if (opts.trigger === "compose_hotkey") {
|
||||||
|
opts.subject = '';
|
||||||
|
opts.private_message_recipient = '';
|
||||||
|
}
|
||||||
|
|
||||||
if (compose.composing() && !same_recipient_as_before(msg_type, opts)) {
|
if (compose.composing() && !same_recipient_as_before(msg_type, opts)) {
|
||||||
// Clear the compose box if the existing message is to a different recipient
|
// Clear the compose box if the existing message is to a different recipient
|
||||||
|
|
|
@ -245,10 +245,10 @@ function process_hotkey(e) {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
case 'compose': // 'c': compose
|
case 'compose': // 'c': compose
|
||||||
compose.start('stream');
|
compose.start('stream', {trigger: "compose_hotkey"});
|
||||||
return true;
|
return true;
|
||||||
case 'compose_private_message':
|
case 'compose_private_message':
|
||||||
compose.start('private');
|
compose.start('private', {trigger: "compose_hotkey"});
|
||||||
return true;
|
return true;
|
||||||
case 'search':
|
case 'search':
|
||||||
search.initiate_search();
|
search.initiate_search();
|
||||||
|
|
Loading…
Reference in New Issue