mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Add Shift+Right Click Shortcut to Reply to a Message (#4424)
Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com> Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
parent
d59076520a
commit
8048dcdd1f
|
@ -5,6 +5,7 @@
|
|||
- Minor: Include normally-stripped mention in replies in logs. (#4420)
|
||||
- Minor: Added support for FrankerFaceZ animated emotes. (#4434)
|
||||
- Minor: Added a local backup of the Twitch Badges API in case the request fails. (#4463)
|
||||
- Minor: Added the ability to reply to a message by `Shift + Right Click`ing the username. (#4424)
|
||||
- Bugfix: Fixed an issue where animated emotes would render on top of zero-width emotes. (#4314)
|
||||
- Bugfix: Fixed an issue where it was difficult to hover a zero-width emote. (#4314)
|
||||
- Bugfix: Fixed an issue where context-menu items for zero-width emotes displayed the wrong provider. (#4460)
|
||||
|
|
|
@ -2091,13 +2091,25 @@ void ChannelView::handleMouseClick(QMouseEvent *event,
|
|||
|
||||
if (link.type == Link::UserInfo)
|
||||
{
|
||||
const bool commaMention =
|
||||
getSettings()->mentionUsersWithComma;
|
||||
const bool isFirstWord =
|
||||
split && split->getInput().isEditFirstWord();
|
||||
auto userMention = formatUserMention(
|
||||
link.value, isFirstWord, commaMention);
|
||||
insertText("@" + userMention + " ");
|
||||
if (hoveredElement->getFlags().has(
|
||||
MessageElementFlag::Username) &&
|
||||
event->modifiers() == Qt::ShiftModifier)
|
||||
{
|
||||
// Start a new reply if Shift+Right-clicking the message username
|
||||
this->setInputReply(layout->getMessagePtr());
|
||||
}
|
||||
else
|
||||
{
|
||||
// Insert @username into split input
|
||||
const bool commaMention =
|
||||
getSettings()->mentionUsersWithComma;
|
||||
const bool isFirstWord =
|
||||
split && split->getInput().isEditFirstWord();
|
||||
auto userMention = formatUserMention(
|
||||
link.value, isFirstWord, commaMention);
|
||||
insertText("@" + userMention + " ");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue