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();
|
||||
|
||||
GenericChatForm* form;
|
||||
GroupId id;
|
||||
const Friend* frnd = widget->getFriend();
|
||||
const Group* group = widget->getGroup();
|
||||
bool chatFormIsSet;
|
||||
if (frnd) {
|
||||
form = chatForms[frnd->getPublicKey()];
|
||||
contentDialogManager->focusChat(frnd->getPersistentId());
|
||||
chatFormIsSet = contentDialogManager->chatWidgetExists(frnd->getPersistentId());
|
||||
} else {
|
||||
id = group->getPersistentId();
|
||||
form = groupChatForms[id].data();
|
||||
form = groupChatForms[group->getPersistentId()].data();
|
||||
contentDialogManager->focusChat(group->getPersistentId());
|
||||
chatFormIsSet = contentDialogManager->chatWidgetExists(group->getPersistentId());
|
||||
}
|
||||
bool chatFormIsSet;
|
||||
contentDialogManager->focusChat(id);
|
||||
chatFormIsSet = contentDialogManager->chatWidgetExists(id);
|
||||
|
||||
|
||||
if ((chatFormIsSet || form->isVisible()) && !newWindow) {
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue
Block a user