fix: ignore channel name when copying message (#5106)

Fixes #5101
This commit is contained in:
nerix 2024-01-19 13:11:25 +01:00 committed by GitHub
parent 4f2ca3b174
commit 5bf1a5a7dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View file

@ -68,6 +68,7 @@
- Bugfix: Fixed a bug where buttons would remain in a hovered state after leaving them. (#5077) - Bugfix: Fixed a bug where buttons would remain in a hovered state after leaving them. (#5077)
- Bugfix: Fixed popup windows not persisting between restarts. (#5081) - Bugfix: Fixed popup windows not persisting between restarts. (#5081)
- Bugfix: Fixed splits not retaining their focus after minimizing. (#5080) - Bugfix: Fixed splits not retaining their focus after minimizing. (#5080)
- Bugfix: Fixed _Copy message_ copying the channel name in global search. (#5106)
- Dev: Run miniaudio in a separate thread, and simplify it to not manage the device ourselves. There's a chance the simplification is a bad idea. (#4978) - Dev: Run miniaudio in a separate thread, and simplify it to not manage the device ourselves. There's a chance the simplification is a bad idea. (#4978)
- Dev: Change clang-format from v14 to v16. (#4929) - Dev: Change clang-format from v14 to v16. (#4929)
- Dev: Fixed UTF16 encoding of `modes` file for the installer. (#4791) - Dev: Fixed UTF16 encoding of `modes` file for the installer. (#4791)

View file

@ -318,9 +318,12 @@ void MessageLayoutContainer::addSelectionText(QString &str, uint32_t from,
if (copymode == CopyMode::OnlyTextAndEmotes) if (copymode == CopyMode::OnlyTextAndEmotes)
{ {
if (element->getCreator().getFlags().hasAny( if (element->getCreator().getFlags().hasAny({
{MessageElementFlag::Timestamp, MessageElementFlag::Timestamp,
MessageElementFlag::Username, MessageElementFlag::Badges})) MessageElementFlag::Username,
MessageElementFlag::Badges,
MessageElementFlag::ChannelName,
}))
{ {
continue; continue;
} }