Browse Source

feat(chatlog): Disable join and leave system messages based on setting

Backported from 069ab92fd0
reviewable/pr6512/r8
Anthony Bilinski 4 years ago
parent
commit
ee0334acc5
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 8
      src/widget/form/groupchatform.cpp

8
src/widget/form/groupchatform.cpp

@ -235,13 +235,17 @@ void GroupChatForm::updateUserNames() @@ -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();
}

Loading…
Cancel
Save