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:
@@ -5,6 +5,7 @@
|
|||||||
- Minor: Include normally-stripped mention in replies in logs. (#4420)
|
- Minor: Include normally-stripped mention in replies in logs. (#4420)
|
||||||
- Minor: Added support for FrankerFaceZ animated emotes. (#4434)
|
- 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 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 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 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)
|
- 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)
|
if (link.type == Link::UserInfo)
|
||||||
{
|
{
|
||||||
const bool commaMention =
|
if (hoveredElement->getFlags().has(
|
||||||
getSettings()->mentionUsersWithComma;
|
MessageElementFlag::Username) &&
|
||||||
const bool isFirstWord =
|
event->modifiers() == Qt::ShiftModifier)
|
||||||
split && split->getInput().isEditFirstWord();
|
{
|
||||||
auto userMention = formatUserMention(
|
// Start a new reply if Shift+Right-clicking the message username
|
||||||
link.value, isFirstWord, commaMention);
|
this->setInputReply(layout->getMessagePtr());
|
||||||
insertText("@" + userMention + " ");
|
}
|
||||||
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user