Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

message_feed: Remove the view edit history from the three-dot menu.

Palash Baderia92d1c6e390dd
diff --git a/web/src/popover_menus.js b/web/src/popover_menus.js
index 577bb5c8089..bbd570cfa42 100644
--- a/web/src/popover_menus.js
+++ b/web/src/popover_menus.js
@@ -34,7 +34,6 @@ import * as flatpickr from "./flatpickr";
import * as giphy from "./giphy";
import {$t_html} from "./i18n";
import * as message_edit from "./message_edit";
-import * as message_edit_history from "./message_edit_history";
import * as message_lists from "./message_lists";
import * as message_viewport from "./message_viewport";
import * as narrow_state from "./narrow_state";
@@ -805,17 +804,6 @@ export function initialize() {
instance.hide();
});
- $popper.one("click", ".view_edit_history", (e) => {
- const message_id = $(e.currentTarget).data("message-id");
- const $row = message_lists.current.get_row(message_id);
- const message = message_lists.current.get(rows.id($row));
- message_edit_history.show_history(message);
- $("#message-history-cancel").trigger("focus");
- e.preventDefault();
- e.stopPropagation();
- instance.hide();
- });
-
$popper.one("click", ".view_read_receipts", (e) => {
const message_id = $(e.currentTarget).data("message-id");
read_receipts.show_user_list(message_id);
diff --git a/web/src/popover_menus_data.js b/web/src/popover_menus_data.js
index f271a3d3687..e0d4dff3e73 100644
--- a/web/src/popover_menus_data.js
+++ b/web/src/popover_menus_data.js
@@ -65,17 +65,6 @@ export function get_actions_popover_content_context(message_id) {
const should_display_mark_as_unread =
!message.unread && not_spectator && (not_stream_message || subscribed_to_stream);
- const should_display_edit_history_option =
- message.edit_history &&
- message.edit_history.some(
- (entry) =>
- entry.prev_content !== undefined ||
- entry.prev_stream !== undefined ||
- entry.prev_topic !== undefined,
- ) &&
- page_params.realm_allow_edit_history &&
- not_spectator;
-
// Disabling this for /me messages is a temporary workaround
// for the fact that we don't have a styling for how that
// should look. See also condense.js.
@@ -113,7 +102,6 @@ export function get_actions_popover_content_context(message_id) {
should_display_collapse,
should_display_uncollapse,
should_display_add_reaction_option,
- should_display_edit_history_option,
should_display_hide_option,
conversation_time_url,
narrowed: narrow_state.active(),
diff --git a/web/templates/actions_popover_content.hbs b/web/templates/actions_popover_content.hbs
index a266aa369e9..ee5e3194449 100644
--- a/web/templates/actions_popover_content.hbs
+++ b/web/templates/actions_popover_content.hbs
@@ -101,15 +101,6 @@
</li>
{{/if}}
- {{#if should_display_edit_history_option}}
- <li>
- <a class="view_edit_history" data-message-id="{{message_id}}" tabindex="0">
- <i class="fa fa-clock-o" aria-hidden="true"></i>
- {{t "View edit history" }}
- </a>
- </li>
- {{/if}}
-
{{#if should_display_read_receipts_option}}
<li>
<a class="view_read_receipts" data-message-id="{{message_id}}" tabindex="0">