fix: middle-clicking username in local channels (#6577)
Reviewed-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
- Bugfix: Fixed Lua errors from handlers of HTTP requests not being logged. (#6452)
|
||||
- Bugfix: Fixed restore button not showing on Windows. (#6565)
|
||||
- Bugfix: Fixed popups and the overlay not being draggable on Wayland. (#6573)
|
||||
- Bugfix: Fixed middle-clicking usernames in a local channel opening an invalid viewercard. (#6577)
|
||||
- Dev: Update release documentation. (#6498)
|
||||
- Dev: Make code sanitizers opt in with the `CHATTERINO_SANITIZER_SUPPORT` CMake option. After that's enabled, use the `SANITIZE_*` flag to enable individual sanitizers. (#6493)
|
||||
- Dev: Remove unused QTextCodec includes. (#6487)
|
||||
|
||||
@@ -2359,8 +2359,26 @@ void ChannelView::mouseReleaseEvent(QMouseEvent *event)
|
||||
if (hoverLayoutElement->getFlags().has(
|
||||
MessageElementFlag::Username))
|
||||
{
|
||||
openTwitchUsercard(this->channel_->getName(),
|
||||
hoverLayoutElement->getLink().value);
|
||||
const auto userName = hoverLayoutElement->getLink().value;
|
||||
const auto type = this->hasSourceChannel()
|
||||
? this->sourceChannel_->getType()
|
||||
: this->channel_->getType();
|
||||
switch (type)
|
||||
{
|
||||
case Channel::Type::TwitchWhispers:
|
||||
case Channel::Type::TwitchLive:
|
||||
QDesktopServices::openUrl(
|
||||
QUrl(u"https://www.twitch.tv/" % userName));
|
||||
break;
|
||||
case Channel::Type::TwitchMentions:
|
||||
openTwitchUsercard(layout->getMessage()->channelName,
|
||||
userName);
|
||||
break;
|
||||
default:
|
||||
openTwitchUsercard(this->channel_->getName(), userName);
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
if (hoverLayoutElement->getLink().isUrl() == false)
|
||||
|
||||
Reference in New Issue
Block a user