mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Reset activeChatroomWidget when switching to addFriendForm
This commit is contained in:
parent
b84d45c896
commit
63150ab022
|
@ -412,6 +412,7 @@ void Widget::onAddClicked()
|
||||||
hideMainForms();
|
hideMainForms();
|
||||||
addFriendForm->show(*ui);
|
addFriendForm->show(*ui);
|
||||||
setWindowTitle(tr("Add friend"));
|
setWindowTitle(tr("Add friend"));
|
||||||
|
activeChatroomWidget = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::onGroupClicked()
|
void Widget::onGroupClicked()
|
||||||
|
@ -705,7 +706,7 @@ void Widget::onFriendMessageReceived(int friendId, const QString& message, bool
|
||||||
HistoryKeeper::getInstance()->addChatEntry(f->getToxID().publicKey, isAction ? "/me " + message : message,
|
HistoryKeeper::getInstance()->addChatEntry(f->getToxID().publicKey, isAction ? "/me " + message : message,
|
||||||
f->getToxID().publicKey, timestamp, true);
|
f->getToxID().publicKey, timestamp, true);
|
||||||
|
|
||||||
f->setEventFlag(static_cast<GenericChatroomWidget*>(f->getFriendWidget()) != activeChatroomWidget);
|
f->setEventFlag(f->getFriendWidget() != activeChatroomWidget);
|
||||||
newMessageAlert(f->getFriendWidget());
|
newMessageAlert(f->getFriendWidget());
|
||||||
f->getFriendWidget()->updateStatusLight();
|
f->getFriendWidget()->updateStatusLight();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user