stuff
This commit is contained in:
parent
abf6b15d20
commit
65a0638336
|
@ -2333,6 +2333,16 @@ module.exports = (_ => {
|
|||
}
|
||||
}, instant ? 0 : 1000);
|
||||
};
|
||||
BDFDB.MessageUtils.openMenu = function (message, e = mousePosition) {
|
||||
if (!message) return;
|
||||
let channel = LibraryModules.ChannelStore.getChannel(message.channel_id);
|
||||
if (channel) LibraryModules.ContextMenuUtils.openContextMenu(e, function (e) {
|
||||
return BDFDB.ReactUtils.createElement((BDFDB.ModuleUtils.findByName("MessageContextMenu", false) || {exports:{}}).exports.default, Object.assign({}, e, {
|
||||
message: message,
|
||||
channel: channel
|
||||
}));
|
||||
});
|
||||
};
|
||||
|
||||
BDFDB.UserUtils = {};
|
||||
BDFDB.UserUtils.is = function (user) {
|
||||
|
|
|
@ -438,7 +438,10 @@ module.exports = (_ => {
|
|||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.MessageGroup, {
|
||||
className: BDFDB.disCN.messagespopoutgroupcozy,
|
||||
message: message,
|
||||
channel: channel
|
||||
channel: channel,
|
||||
onContextMenu: e => {
|
||||
BDFDB.MessageUtils.openMenu(message, e);
|
||||
}
|
||||
}),
|
||||
BDFDB.ReactUtils.createElement("div", {
|
||||
className: BDFDB.disCN.messagespopoutactionbuttons,
|
||||
|
|
Loading…
Reference in New Issue