From 0d1c43d1d9b6c56687c688459671ce2137fcdd94 Mon Sep 17 00:00:00 2001 From: Lauryn Menard Date: Mon, 26 Jun 2023 14:41:09 +0200 Subject: [PATCH] server-events: Remove unused home_view_loaded.zulip event trigger. In commit 92ad98814429c8, we removed the local echo code that tried to re-render locally echoed messages that were rendered right before a server/browser restart. These changes removed the only event triggered by `"home_view_loaded.zulip"`. This removes the remaining `"home_view_loaded.zulip"` event trigger in web/src/server_events.js since it no longer triggers any events. --- web/src/server_events.js | 1 - web/tests/server_events.test.js | 7 ------- 2 files changed, 8 deletions(-) diff --git a/web/src/server_events.js b/web/src/server_events.js index f7cbb08837..5cf410c577 100644 --- a/web/src/server_events.js +++ b/web/src/server_events.js @@ -264,7 +264,6 @@ export function force_get_events() { export function home_view_loaded() { waiting_on_homeview_load = false; get_events_success([]); - $(document).trigger("home_view_loaded.zulip"); } export function initialize() { diff --git a/web/tests/server_events.test.js b/web/tests/server_events.test.js index 1769abd419..560437ff18 100644 --- a/web/tests/server_events.test.js +++ b/web/tests/server_events.test.js @@ -9,13 +9,6 @@ const {page_params} = require("./lib/zpage_params"); const noop = () => {}; -set_global("document", { - to_$() { - return { - trigger() {}, - }; - }, -}); set_global("addEventListener", noop); const channel = mock_esm("../src/channel");