mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 10:26:28 +00:00
message_events: Reorder to better organize variables.
This commit is contained in:
@@ -181,16 +181,6 @@ export function update_messages(events) {
|
|||||||
message_edit.end_message_row_edit($row);
|
message_edit.end_message_row_edit($row);
|
||||||
}
|
}
|
||||||
|
|
||||||
// new_topic will be undefined if the topic is unchanged.
|
|
||||||
const new_topic = util.get_edit_event_topic(event);
|
|
||||||
// new_stream_id will be undefined if the stream is unchanged.
|
|
||||||
const new_stream_id = event.new_stream_id;
|
|
||||||
// old_stream_id will be present and valid for all stream messages.
|
|
||||||
const old_stream_id = event.stream_id;
|
|
||||||
// old_stream will be undefined if the message was moved from
|
|
||||||
// a stream that the current user doesn't have access to.
|
|
||||||
const old_stream = sub_store.get(event.stream_id);
|
|
||||||
|
|
||||||
// Save the content edit to the front end msg.edit_history
|
// Save the content edit to the front end msg.edit_history
|
||||||
// before topic edits to ensure that combined topic / content
|
// before topic edits to ensure that combined topic / content
|
||||||
// edits have edit_history logged for both before any
|
// edits have edit_history logged for both before any
|
||||||
@@ -221,6 +211,16 @@ export function update_messages(events) {
|
|||||||
msg.raw_content = event.content;
|
msg.raw_content = event.content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// new_topic will be undefined if the topic is unchanged.
|
||||||
|
const new_topic = util.get_edit_event_topic(event);
|
||||||
|
// new_stream_id will be undefined if the stream is unchanged.
|
||||||
|
const new_stream_id = event.new_stream_id;
|
||||||
|
// old_stream_id will be present and valid for all stream messages.
|
||||||
|
const old_stream_id = event.stream_id;
|
||||||
|
// old_stream will be undefined if the message was moved from
|
||||||
|
// a stream that the current user doesn't have access to.
|
||||||
|
const old_stream = sub_store.get(event.stream_id);
|
||||||
|
|
||||||
// A topic or stream edit may affect multiple messages, listed in
|
// A topic or stream edit may affect multiple messages, listed in
|
||||||
// event.message_ids. event.message_id is still the first message
|
// event.message_ids. event.message_id is still the first message
|
||||||
// where the user initiated the edit.
|
// where the user initiated the edit.
|
||||||
|
|||||||
Reference in New Issue
Block a user