mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge pull request #6576
bodwok (1): fix(contacts): window with multiple friends contacts
This commit is contained in:
commit
bc8763e835
|
@ -1359,19 +1359,18 @@ void Widget::openDialog(GenericChatroomWidget* widget, bool newWindow)
|
||||||
widget->updateStatusLight();
|
widget->updateStatusLight();
|
||||||
|
|
||||||
GenericChatForm* form;
|
GenericChatForm* form;
|
||||||
GroupId id;
|
|
||||||
const Friend* frnd = widget->getFriend();
|
const Friend* frnd = widget->getFriend();
|
||||||
const Group* group = widget->getGroup();
|
const Group* group = widget->getGroup();
|
||||||
|
bool chatFormIsSet;
|
||||||
if (frnd) {
|
if (frnd) {
|
||||||
form = chatForms[frnd->getPublicKey()];
|
form = chatForms[frnd->getPublicKey()];
|
||||||
|
contentDialogManager->focusChat(frnd->getPersistentId());
|
||||||
|
chatFormIsSet = contentDialogManager->chatWidgetExists(frnd->getPersistentId());
|
||||||
} else {
|
} else {
|
||||||
id = group->getPersistentId();
|
form = groupChatForms[group->getPersistentId()].data();
|
||||||
form = groupChatForms[id].data();
|
contentDialogManager->focusChat(group->getPersistentId());
|
||||||
|
chatFormIsSet = contentDialogManager->chatWidgetExists(group->getPersistentId());
|
||||||
}
|
}
|
||||||
bool chatFormIsSet;
|
|
||||||
contentDialogManager->focusChat(id);
|
|
||||||
chatFormIsSet = contentDialogManager->chatWidgetExists(id);
|
|
||||||
|
|
||||||
|
|
||||||
if ((chatFormIsSet || form->isVisible()) && !newWindow) {
|
if ((chatFormIsSet || form->isVisible()) && !newWindow) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user