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:
parent
069ab92fd0
commit
de924cfdc7
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user