1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

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

Backported from 069ab92fd0
This commit is contained in:
Anthony Bilinski 2022-02-14 02:35:02 -08:00
parent 423049db50
commit ee0334acc5
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -235,13 +235,17 @@ void GroupChatForm::updateUserNames()
void GroupChatForm::onUserJoined(const ToxPk& user, const QString& name)
{
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)
{
if (settings.getShowGroupJoinLeaveMessages()) {
addSystemInfoMessage(tr("%1 has left the group").arg(name), ChatMessage::INFO, QDateTime::currentDateTime());
}
updateUserNames();
}