diff --git a/src/plugins/messageLogger/index.tsx b/src/plugins/messageLogger/index.tsx
index d134cd267..484429fbf 100644
--- a/src/plugins/messageLogger/index.tsx
+++ b/src/plugins/messageLogger/index.tsx
@@ -51,11 +51,28 @@ const patchMessageContextMenu: NavContextMenuPatchCallback = (children, props) =
if (!deleted && !editHistory?.length) return;
+ toggle: {
+ if (!deleted) break toggle;
+
+ const domElement = document.getElementById(`chat-messages-${channel_id}-${id}`);
+ if (!domElement) break toggle;
+
+ children.push((
+
domElement.classList.toggle("messagelogger-deleted")}
+ />
+ ));
+ }
+
children.push((
{
if (deleted) {
FluxDispatcher.dispatch({
@@ -70,20 +87,6 @@ const patchMessageContextMenu: NavContextMenuPatchCallback = (children, props) =
}}
/>
));
-
- if (!deleted) return;
-
- const domElement = document.getElementById(`chat-messages-${channel_id}-${id}`);
- if (!domElement) return;
-
- children.push((
- domElement.classList.toggle("messagelogger-deleted")}
- />
- ));
};
export default definePlugin({
diff --git a/src/webpack/common/types/menu.d.ts b/src/webpack/common/types/menu.d.ts
index b52e78fdb..39e15307a 100644
--- a/src/webpack/common/types/menu.d.ts
+++ b/src/webpack/common/types/menu.d.ts
@@ -38,6 +38,7 @@ export interface Menu {
label: string;
action?(e: MouseEvent): void;
+ color?: string;
render?: ComponentType;
onChildrenScroll?: Function;
childRowHeight?: number;