Skip to content

Commit

Permalink
fix: ignore channel name when copying message (#5106)
Browse files Browse the repository at this point in the history
Fixes #5101
  • Loading branch information
Nerixyz authored Jan 19, 2024
1 parent 4f2ca3b commit 5bf1a5a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
- 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 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: Change clang-format from v14 to v16. (#4929)
- Dev: Fixed UTF16 encoding of `modes` file for the installer. (#4791)
Expand Down
9 changes: 6 additions & 3 deletions src/messages/layouts/MessageLayoutContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,12 @@ void MessageLayoutContainer::addSelectionText(QString &str, uint32_t from,

if (copymode == CopyMode::OnlyTextAndEmotes)
{
if (element->getCreator().getFlags().hasAny(
{MessageElementFlag::Timestamp,
MessageElementFlag::Username, MessageElementFlag::Badges}))
if (element->getCreator().getFlags().hasAny({
MessageElementFlag::Timestamp,
MessageElementFlag::Username,
MessageElementFlag::Badges,
MessageElementFlag::ChannelName,
}))
{
continue;
}
Expand Down

0 comments on commit 5bf1a5a

Please sign in to comment.