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

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

View File

@ -231,13 +231,17 @@ void GroupChatForm::updateUserNames()
void GroupChatForm::onUserJoined(const ToxPk& user, const QString& name) void GroupChatForm::onUserJoined(const ToxPk& user, const QString& name)
{ {
addSystemInfoMessage(QDateTime::currentDateTime(), SystemMessageType::userJoinedGroup, {name}); if (settings.getShowGroupJoinLeaveMessages()) {
addSystemInfoMessage(QDateTime::currentDateTime(), SystemMessageType::userJoinedGroup, {name});
}
updateUserNames(); updateUserNames();
} }
void GroupChatForm::onUserLeft(const ToxPk& user, const QString& name) void GroupChatForm::onUserLeft(const ToxPk& user, const QString& name)
{ {
addSystemInfoMessage(QDateTime::currentDateTime(), SystemMessageType::userLeftGroup, {name}); if (settings.getShowGroupJoinLeaveMessages()) {
addSystemInfoMessage(QDateTime::currentDateTime(), SystemMessageType::userLeftGroup, {name});
}
updateUserNames(); updateUserNames();
} }