Merge pull request #6576

bodwok (1):
      fix(contacts): window with multiple friends contacts
pull/6623/merge
Anthony Bilinski 2022-05-08 05:27:10 -07:00
commit bc8763e835
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
1 changed files with 6 additions and 7 deletions

View File

@ -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;