From 755f8d7ab02400ecd4ca07209306b01f88301938 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 3 Aug 2023 10:23:20 +0100 Subject: [PATCH] Fix AppTile context menu not always showing up when it has options (#11358) * Fix AppTile context menu not always showing up when it has options * Comment * Update snapshots --- src/components/views/elements/AppTile.tsx | 3 +- .../__snapshots__/AppTile-test.tsx.snap | 39 +++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/src/components/views/elements/AppTile.tsx b/src/components/views/elements/AppTile.tsx index 2c1125e56d..c71889545c 100644 --- a/src/components/views/elements/AppTile.tsx +++ b/src/components/views/elements/AppTile.tsx @@ -134,8 +134,9 @@ export default class AppTile extends React.Component { private dispatcherRef?: string; private unmounted = false; - public constructor(props: IProps) { + public constructor(props: IProps, context: ContextType) { super(props); + this.context = context; // XXX: workaround for lack of `declare` support on `public context!:` definition // Tiles in miniMode are floating, and therefore not docked if (!this.props.miniMode) { diff --git a/test/components/views/elements/__snapshots__/AppTile-test.tsx.snap b/test/components/views/elements/__snapshots__/AppTile-test.tsx.snap index 70a1b899d0..843ee980e1 100644 --- a/test/components/views/elements/__snapshots__/AppTile-test.tsx.snap +++ b/test/components/views/elements/__snapshots__/AppTile-test.tsx.snap @@ -139,6 +139,19 @@ exports[`AppTile for a pinned widget should render 1`] = ` class="mx_Icon mx_Icon_12" /> +
+
+