MessageClickActions: Fix Shift Reply turning into No Mention
This commit is contained in:
parent
5a47e41f91
commit
8492c8d0ad
1 changed files with 6 additions and 5 deletions
|
|
@ -453,7 +453,8 @@ async function executeAction(
|
|||
action: ClickAction,
|
||||
msg: Message,
|
||||
channel: Channel,
|
||||
event: MouseEvent
|
||||
event: MouseEvent,
|
||||
triggerModifier: Modifier = "NONE"
|
||||
) {
|
||||
const myId = AuthenticationStore.getId();
|
||||
const isMe = msg.author.id === myId;
|
||||
|
|
@ -506,7 +507,7 @@ async function executeAction(
|
|||
if (!canReply(msg)) return;
|
||||
if (!canSend(channel)) return;
|
||||
|
||||
const isShiftPress = event.shiftKey;
|
||||
const isShiftPress = event.shiftKey && triggerModifier !== "SHIFT";
|
||||
const shouldMention = isPluginEnabled(NoReplyMentionPlugin.name)
|
||||
? NoReplyMentionPlugin.shouldMention(msg, isShiftPress)
|
||||
: !isShiftPress;
|
||||
|
|
@ -653,7 +654,7 @@ export default definePlugin({
|
|||
}
|
||||
|
||||
if (isModifierPressed(tripleClickModifier) && tripleClickAction !== "NONE") {
|
||||
executeAction(tripleClickAction, msg, channel, event);
|
||||
executeAction(tripleClickAction, msg, channel, event, tripleClickModifier);
|
||||
pressedModifiers.clear();
|
||||
}
|
||||
doubleClickFired = false;
|
||||
|
|
@ -684,7 +685,7 @@ export default definePlugin({
|
|||
if (!canSend(channel)) return;
|
||||
if (msg.deleted === true) return;
|
||||
if (canDoubleClick && isQuickDoubleClick) {
|
||||
executeAction(doubleClickAction, msg, channel, event);
|
||||
executeAction(doubleClickAction, msg, channel, event, doubleClickModifier);
|
||||
pressedModifiers.clear();
|
||||
}
|
||||
};
|
||||
|
|
@ -716,7 +717,7 @@ export default definePlugin({
|
|||
|
||||
const executeSingleClick = () => {
|
||||
if (!doubleClickFired && !doubleClickDetected && isModifierPressed(singleClickModifier) && singleClickAction !== "NONE") {
|
||||
executeAction(singleClickAction, msg, channel, event);
|
||||
executeAction(singleClickAction, msg, channel, event, singleClickModifier);
|
||||
pressedModifiers.clear();
|
||||
}
|
||||
resetClickState();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue