Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
feat(chatlog): Disable join and leave system messages based on setting
Browse files Browse the repository at this point in the history
Backported from 069ab92
  • Loading branch information
anthonybilinski committed Mar 5, 2022
1 parent 423049d commit ee0334a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/widget/form/groupchatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,17 @@ void GroupChatForm::updateUserNames()

void GroupChatForm::onUserJoined(const ToxPk& user, const QString& name)
{
addSystemInfoMessage(tr("%1 has joined the group").arg(name), ChatMessage::INFO, QDateTime::currentDateTime());
if (settings.getShowGroupJoinLeaveMessages()) {
addSystemInfoMessage(tr("%1 has joined the group").arg(name), ChatMessage::INFO, QDateTime::currentDateTime());
}
updateUserNames();
}

void GroupChatForm::onUserLeft(const ToxPk& user, const QString& name)
{
addSystemInfoMessage(tr("%1 has left the group").arg(name), ChatMessage::INFO, QDateTime::currentDateTime());
if (settings.getShowGroupJoinLeaveMessages()) {
addSystemInfoMessage(tr("%1 has left the group").arg(name), ChatMessage::INFO, QDateTime::currentDateTime());
}
updateUserNames();
}

Expand Down

0 comments on commit ee0334a

Please sign in to comment.