fix: don't show reply button on inline whispers or announcements (#5863)

This commit is contained in:
Matthias Kronberg
2025-01-30 22:33:44 +01:00
committed by GitHub
parent f914e0406e
commit 22f5f4ea26
3 changed files with 20 additions and 29 deletions
+1
View File
@@ -17,6 +17,7 @@
- Bugfix: Fixed tabs not scaling to the default scale when changing the scale from a non-default value. (#5794, #5833) - Bugfix: Fixed tabs not scaling to the default scale when changing the scale from a non-default value. (#5794, #5833)
- Bugfix: Fixed deleted messages not immediately disappearing when "Hide deleted messages" is enabled. (#5844, #5854) - Bugfix: Fixed deleted messages not immediately disappearing when "Hide deleted messages" is enabled. (#5844, #5854)
- Bugfix: Fixed announcements not showing up in mentions tab. (#5857) - Bugfix: Fixed announcements not showing up in mentions tab. (#5857)
- Bugfix: Fixed the reply button showing for inline whispers and announcements. (#5863)
- Bugfix: Fixed suspicious user treatment update messages not being searchable. (#5865) - Bugfix: Fixed suspicious user treatment update messages not being searchable. (#5865)
- Dev: Highlight checks now use non-capturing groups for the boundaries. (#5784) - Dev: Highlight checks now use non-capturing groups for the boundaries. (#5784)
- Dev: Updated Conan dependencies. (#5776) - Dev: Updated Conan dependencies. (#5776)
+19 -16
View File
@@ -2258,23 +2258,26 @@ std::pair<MessagePtrMut, HighlightAlert> MessageBuilder::makeIrcMessage(
ColorProvider::instance().color(ColorType::Whisper); ColorProvider::instance().color(ColorType::Whisper);
} }
if (thread) if (!args.isReceivedWhisper && tags.value("msg-id") != "announcement")
{ {
auto &img = getResources().buttons.replyThreadDark; if (thread)
builder {
.emplace<CircularImageElement>(Image::fromResourcePixmap(img, 0.15), auto &img = getResources().buttons.replyThreadDark;
2, Qt::gray, builder
MessageElementFlag::ReplyButton) .emplace<CircularImageElement>(
->setLink({Link::ViewThread, thread->rootId()}); Image::fromResourcePixmap(img, 0.15), 2, Qt::gray,
} MessageElementFlag::ReplyButton)
else ->setLink({Link::ViewThread, thread->rootId()});
{ }
auto &img = getResources().buttons.replyDark; else
builder {
.emplace<CircularImageElement>(Image::fromResourcePixmap(img, 0.15), auto &img = getResources().buttons.replyDark;
2, Qt::gray, builder
MessageElementFlag::ReplyButton) .emplace<CircularImageElement>(
->setLink({Link::ReplyToMessage, builder->id}); Image::fromResourcePixmap(img, 0.15), 2, Qt::gray,
MessageElementFlag::ReplyButton)
->setLink({Link::ReplyToMessage, builder->id});
}
} }
return {builder.release(), highlight}; return {builder.release(), highlight};
@@ -136,19 +136,6 @@
"test", "test",
"lol" "lol"
] ]
},
{
"background": "#ffa0a0a4",
"flags": "ReplyButton",
"link": {
"type": "ReplyToMessage",
"value": "8c26e1ab-b50c-4d9d-bc11-3fd57a941d90"
},
"padding": 2,
"tooltip": "",
"trailingSpace": true,
"type": "CircularImageElement",
"url": ""
} }
], ],
"flags": "Highlighted|Collapsed|Subscription", "flags": "Highlighted|Collapsed|Subscription",