From e307a2c14d360c3fe50e5190eb67863921a95fbb Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Tue, 6 Oct 2020 12:40:59 +0200 Subject: [PATCH] stuff --- Library/0BDFDB.plugin.js | 4 ++-- Plugins/PersonalPins/PersonalPins.plugin.js | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index 9e84d809cf..36d24251e3 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -2333,11 +2333,11 @@ module.exports = (_ => { } }, instant ? 0 : 1000); }; - BDFDB.MessageUtils.openMenu = function (message, e = mousePosition) { + BDFDB.MessageUtils.openMenu = function (message, e = mousePosition, slim = false) { 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, { + return BDFDB.ReactUtils.createElement((BDFDB.ModuleUtils.findByName(slim ? "MessageSearchResultContextMenu" : "MessageContextMenu", false) || {exports:{}}).exports.default, Object.assign({}, e, { message: message, channel: channel })); diff --git a/Plugins/PersonalPins/PersonalPins.plugin.js b/Plugins/PersonalPins/PersonalPins.plugin.js index b8cb1840a1..7746cf8fc8 100644 --- a/Plugins/PersonalPins/PersonalPins.plugin.js +++ b/Plugins/PersonalPins/PersonalPins.plugin.js @@ -405,14 +405,14 @@ module.exports = (_ => { renderMessage (buttonInstance, note, message, channel, filter) { if (!message || !channel) return null; - let channelname = channel.name; + let channelName = channel.name; let guild = channel.guild_id && BDFDB.LibraryModules.GuildStore.getGuild(channel.guild_id); let role = guild && BDFDB.LibraryModules.PermissionRoleUtils.getHighestRole(guild, message.author.id); if (role) message.colorString = role.colorString; - if (filter != "channel" && !channelname && channel.recipients.length > 0) { + if (filter != "channel" && !channelName && channel.recipients.length > 0) { for (let dmuser_id of channel.recipients) { - channelname = channelname ? channelname + ", @" : channelname; - channelname = channelname + ((BDFDB.LibraryModules.UserStore.getUser(dmuser_id) || {}).username || BDFDB.LanguageUtils.LanguageStrings.UNKNOWN_USER); + channelName = channelName ? channelName + ", @" : channelName; + channelName = channelName + ((BDFDB.LibraryModules.UserStore.getUser(dmuser_id) || {}).username || BDFDB.LanguageUtils.LanguageStrings.UNKNOWN_USER); } } return [filter == "channel" ? null : BDFDB.ReactUtils.createElement("div", { @@ -424,7 +424,7 @@ module.exports = (_ => { onClick: _ => { BDFDB.LibraryModules.SelectChannelUtils.selectChannel(channel.guild_id, channel.id); }, - children: channelname ? ((channel.guild_id ? "#" : "@") + channelname) : "???" + children: channelName ? ((channel.guild_id ? "#" : "@") + channelName) : "???" }), filter == "all" ? BDFDB.ReactUtils.createElement("span", { className: BDFDB.disCN.messagespopoutguildname, @@ -440,7 +440,7 @@ module.exports = (_ => { message: message, channel: channel, onContextMenu: e => { - BDFDB.MessageUtils.openMenu(message, e); + BDFDB.MessageUtils.openMenu(message, e, true); } }), BDFDB.ReactUtils.createElement("div", {