MLE: Temp Remove Button

This commit is contained in:
thororen1234 2025-07-13 07:34:37 -04:00
parent 55bcba21fa
commit 9d33e9f088
No known key found for this signature in database

View file

@ -74,28 +74,34 @@ const patchMessageContextMenu: NavContextMenuPatchCallback = (
);
}
let label;
if (!Vencord.Plugins.isPluginEnabled("MessageLoggerEnhanced")) {
children.push(
<Menu.MenuItem
id={REMOVE_HISTORY_ID}
key={REMOVE_HISTORY_ID}
label="Remove Message History"
color="danger"
action={() => {
if (deleted) {
FluxDispatcher.dispatch({
type: "MESSAGE_DELETE",
channelId: channel_id,
id,
mlDeleted: true,
});
} else {
message.editHistory = [];
}
}}
/>,
);
label = "Remove Message History";
} else {
label = "Remove Message (Temporary)";
}
children.push(
<Menu.MenuItem
id={REMOVE_HISTORY_ID}
key={REMOVE_HISTORY_ID}
label={label}
color="danger"
action={() => {
if (deleted) {
FluxDispatcher.dispatch({
type: "MESSAGE_DELETE",
channelId: channel_id,
id,
mlDeleted: true,
});
} else {
message.editHistory = [];
}
}}
/>,
);
};
const patchChannelContextMenu: NavContextMenuPatchCallback = (