giphy: Fix incorrectly working show/hide behaviour.

There were some changes that were lost/added by mistake
during a rebase of #17707 after #18154 was merged.

Fixes the GIF icon being hidden / displayed incorrectly
with respect to the settings.

These changes were originally part of
67527a2517 but
were lost during the rebase.
This commit is contained in:
Aman Agrawal
2021-04-15 14:18:36 +00:00
committed by Tim Abbott
parent cf796b4343
commit 2a1bcd4b59
7 changed files with 19 additions and 10 deletions

View File

@@ -63,6 +63,9 @@ const ui_util = mock_esm("../../static/js/ui_util");
mock_esm("../../static/js/drafts", {
delete_draft_after_send: noop,
});
mock_esm("../../static/js/giphy", {
is_giphy_enabled: () => true,
});
mock_esm("../../static/js/notifications", {
notify_above_composebox: noop,
clear_compose_notifications: noop,

View File

@@ -13,6 +13,9 @@ const events = require("./lib/events");
mock_cjs("jquery", $);
const channel = mock_esm("../../static/js/channel");
const upload = mock_esm("../../static/js/upload");
mock_esm("../../static/js/giphy", {
is_giphy_enabled: () => true,
});
mock_esm("../../static/js/resize", {
watch_manual_resize() {},
});
@@ -27,7 +30,6 @@ set_global("document", {
const server_events_dispatch = zrequire("server_events_dispatch");
const compose_ui = zrequire("compose_ui");
const compose = zrequire("compose");
function stub_out_video_calls() {
const elem = $("#below-compose-content .video_link");
elem.toggle = (show) => {