mirror of
https://github.com/zulip/zulip.git
synced 2025-11-20 14:38:46 +00:00
Always keep the compose box open after sending.
(Some cases are disabled on outside of staging still due to mix protection concerns). (imported from commit 26fcb95c055640ddd87c5df424990ebd865a336a)
This commit is contained in:
@@ -48,7 +48,7 @@ var globals =
|
||||
+ ' mark_all_as_read message_unread process_read_messages unread_in_current_view'
|
||||
+ ' fast_forward_pointer recent_subjects unread_subjects'
|
||||
+ ' add_message_metadata'
|
||||
+ ' respond_to_cursor respond_to_sent_message'
|
||||
+ ' respond_to_cursor'
|
||||
+ ' mark_message_as_read'
|
||||
;
|
||||
|
||||
|
||||
@@ -269,7 +269,6 @@ exports.cancel = function () {
|
||||
}
|
||||
$(document).trigger($.Event('compose_canceled.zephyr'));
|
||||
respond_to_cursor = false;
|
||||
respond_to_sent_message = false;
|
||||
};
|
||||
|
||||
exports.empty_subject_placeholder = function () {
|
||||
@@ -387,7 +386,7 @@ function send_message() {
|
||||
else {
|
||||
respond_to_cursor = false;
|
||||
}
|
||||
if (respond_to_sent_message && page_params.staging) {
|
||||
if (page_params.staging) {
|
||||
var new_msg = $.extend({replying_to_message: request}, request);
|
||||
new_msg.content = "";
|
||||
compose.start(new_msg.type, new_msg);
|
||||
@@ -554,7 +553,6 @@ $(function () {
|
||||
$("#new_message_content").focus(function (e) {
|
||||
// If we click in the composebox, start up a new message
|
||||
if (!compose.composing()) {
|
||||
respond_to_sent_message = true;
|
||||
if (narrow.narrowed_to_pms()) {
|
||||
compose.start('private');
|
||||
} else {
|
||||
@@ -623,7 +621,6 @@ $(function () {
|
||||
// Urgh, yet another hack to make sure we're "composing"
|
||||
// when text gets added into the composebox.
|
||||
if (!compose.composing()) {
|
||||
respond_to_sent_message = true;
|
||||
compose.start('stream');
|
||||
}
|
||||
if (i === -1) {
|
||||
@@ -647,7 +644,6 @@ $(function () {
|
||||
rawDrop: function (contents) {
|
||||
var textbox = $("#new_message_content");
|
||||
if (!compose.composing()) {
|
||||
respond_to_sent_message = true;
|
||||
compose.start('stream');
|
||||
}
|
||||
textbox.val(textbox.val() + contents);
|
||||
|
||||
@@ -273,11 +273,9 @@ function process_hotkey(e) {
|
||||
return true;
|
||||
case 'compose': // 'c': compose
|
||||
compose.start('stream');
|
||||
respond_to_sent_message = true;
|
||||
return true;
|
||||
case 'compose_private_message':
|
||||
compose.start('private');
|
||||
respond_to_sent_message = true;
|
||||
return true;
|
||||
case 'enter': // Enter: respond to message (unless we need to do something else)
|
||||
respond_to_cursor = true;
|
||||
|
||||
@@ -1158,7 +1158,6 @@ $(function () {
|
||||
$('#user_presences').on('click', 'a', function (e) {
|
||||
var email = $(e.target).closest('a').attr('data-email');
|
||||
narrow.by('pm-with', email, {trigger: 'presence list'});
|
||||
respond_to_sent_message = true;
|
||||
compose.start('private', {private_message_recipient: email,
|
||||
trigger: 'presence list'});
|
||||
// The preventDefault is necessary so that clicking the
|
||||
|
||||
@@ -10,7 +10,6 @@ var queued_mark_as_read = [];
|
||||
var queued_flag_timer;
|
||||
|
||||
var respond_to_cursor = false;
|
||||
var respond_to_sent_message = false;
|
||||
|
||||
var get_updates_params = {
|
||||
pointer: -1
|
||||
|
||||
Reference in New Issue
Block a user