Fixed right-clicking mentions no longer working. (#4751)
* fix up rightclicking mentions * changelog * Merge changelog entries other PR was merged after 2.4.4
This commit is contained in:
+1
-1
@@ -19,6 +19,7 @@
|
||||
- Minor: Stream status requests are now batched. (#4713)
|
||||
- Minor: Added `/c2-theme-autoreload` command to automatically reload a custom theme. This is useful for when you're developing your own theme. (#4718)
|
||||
- Minor: Show channel point redemptions without messages in usercard. (#4557)
|
||||
- Minor: Allow for customizing the behavior of `Right Click`ing of usernames. (#4622, #4751)
|
||||
- Bugfix: Increased amount of blocked users loaded from 100 to 1,000. (#4721)
|
||||
- Bugfix: Fixed generation of crashdumps by the browser-extension process when the browser was closed. (#4667)
|
||||
- Bugfix: Fix spacing issue with mentions inside RTL text. (#4677)
|
||||
@@ -54,7 +55,6 @@
|
||||
- Minor: Added a Send button in the input box so you can click to send a message. This is disabled by default and can be enabled with the "Show send message button" setting. (#4607)
|
||||
- Minor: Improved error messages when the updater fails a download. (#4594)
|
||||
- Minor: Added `/shield` and `/shieldoff` commands to toggle shield mode. (#4580)
|
||||
- Minor: Allow for customizing the behavior of `Right Click`ing of usernames. (#4622)
|
||||
- Bugfix: Fixed the menu warping on macOS on Qt6. (#4595)
|
||||
- Bugfix: Fixed link tooltips not showing unless the thumbnail setting was enabled. (#4597)
|
||||
- Bugfix: Domains starting with `http` are now parsed as links again. (#4598)
|
||||
|
||||
@@ -2104,8 +2104,15 @@ void ChannelView::handleMouseClick(QMouseEvent *event,
|
||||
|
||||
if (link.type == Link::UserInfo)
|
||||
{
|
||||
if (hoveredElement->getFlags().has(
|
||||
MessageElementFlag::Username))
|
||||
// This is terrible because it FPs on messages where the
|
||||
// user mentions themselves
|
||||
bool canReply =
|
||||
QString::compare(link.value,
|
||||
layout->getMessage()->loginName,
|
||||
Qt::CaseInsensitive) == 0;
|
||||
UsernameRightClickBehavior action =
|
||||
UsernameRightClickBehavior::Mention;
|
||||
if (canReply)
|
||||
{
|
||||
Qt::KeyboardModifier userSpecifiedModifier =
|
||||
getSettings()->usernameRightClickModifier;
|
||||
@@ -2124,7 +2131,6 @@ void ChannelView::handleMouseClick(QMouseEvent *event,
|
||||
Qt::KeyboardModifiers modifiers{userSpecifiedModifier};
|
||||
auto isModifierHeld = event->modifiers() == modifiers;
|
||||
|
||||
UsernameRightClickBehavior action{};
|
||||
if (isModifierHeld)
|
||||
{
|
||||
action = getSettings()
|
||||
@@ -2134,7 +2140,7 @@ void ChannelView::handleMouseClick(QMouseEvent *event,
|
||||
{
|
||||
action = getSettings()->usernameRightClickBehavior;
|
||||
}
|
||||
|
||||
}
|
||||
switch (action)
|
||||
{
|
||||
case UsernameRightClickBehavior::Mention: {
|
||||
@@ -2172,7 +2178,6 @@ void ChannelView::handleMouseClick(QMouseEvent *event,
|
||||
}
|
||||
break; // unreachable
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user