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:
parent
423049db50
commit
ee0334acc5
|
@ -235,13 +235,17 @@ void GroupChatForm::updateUserNames()
|
||||||
|
|
||||||
void GroupChatForm::onUserJoined(const ToxPk& user, const QString& name)
|
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());
|
addSystemInfoMessage(tr("%1 has joined the group").arg(name), ChatMessage::INFO, QDateTime::currentDateTime());
|
||||||
|
}
|
||||||
updateUserNames();
|
updateUserNames();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GroupChatForm::onUserLeft(const ToxPk& user, const QString& name)
|
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());
|
addSystemInfoMessage(tr("%1 has left the group").arg(name), ChatMessage::INFO, QDateTime::currentDateTime());
|
||||||
|
}
|
||||||
updateUserNames();
|
updateUserNames();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user