mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
compose.js: Remove dead code from mark_end_to_end_display_time().
This piece was dead because exports.send_times_data[message_id]
cannot be undefined since the only place this function is called
from is exports.report_as_received() and that function has a call
to mark_end_to_end_receive_time() before a call is made to the
function in question for dead code. The function call to
mark_end_to_end_receive_time results in
exports.send_times_data[message_id] = {} if this was not defined
already. So there can be no instance where we end up the code
being removed.
This commit is contained in:
@@ -236,9 +236,6 @@ function mark_end_to_end_receive_time(message_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function mark_end_to_end_display_time(message_id) {
|
function mark_end_to_end_display_time(message_id) {
|
||||||
if (exports.send_times_data[message_id] === undefined) {
|
|
||||||
exports.send_times_data[message_id] = {};
|
|
||||||
}
|
|
||||||
exports.send_times_data[message_id].displayed = new Date();
|
exports.send_times_data[message_id].displayed = new Date();
|
||||||
maybe_report_send_times(message_id);
|
maybe_report_send_times(message_id);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user