mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge pull request #3348
a68366 (1): fix(widget): open a chat window instead of contacts list in multi-window mode
This commit is contained in:
commit
e8a4599f69
|
@ -1189,8 +1189,28 @@ bool Widget::newFriendMessageAlert(int friendId, bool sound)
|
|||
}
|
||||
else
|
||||
{
|
||||
currentWindow = window();
|
||||
hasActive = f->getFriendWidget() == activeChatroomWidget;
|
||||
if (Settings::getInstance().getSeparateWindow())
|
||||
{
|
||||
if (Settings::getInstance().getDontGroupWindows())
|
||||
{
|
||||
contentDialog = createContentDialog();
|
||||
}
|
||||
else
|
||||
{
|
||||
contentDialog = ContentDialog::current();
|
||||
if (!contentDialog)
|
||||
contentDialog = createContentDialog();
|
||||
}
|
||||
|
||||
addFriendDialog(f, contentDialog);
|
||||
currentWindow = contentDialog->window();
|
||||
hasActive = ContentDialog::isFriendWidgetActive(friendId);
|
||||
}
|
||||
else
|
||||
{
|
||||
currentWindow = window();
|
||||
hasActive = f->getFriendWidget() == activeChatroomWidget;
|
||||
}
|
||||
}
|
||||
|
||||
if (newMessageAlert(currentWindow, hasActive, sound))
|
||||
|
@ -1391,7 +1411,6 @@ void Widget::updateScroll(GenericChatroomWidget *widget) {
|
|||
ContentDialog* Widget::createContentDialog() const
|
||||
{
|
||||
ContentDialog* contentDialog = new ContentDialog(settingsWidget);
|
||||
contentDialog->show();
|
||||
#ifdef Q_OS_MAC
|
||||
connect(contentDialog, &ContentDialog::destroyed, &Nexus::getInstance(), &Nexus::updateWindowsClosed);
|
||||
connect(contentDialog, &ContentDialog::windowStateChanged, &Nexus::getInstance(), &Nexus::onWindowStateChanged);
|
||||
|
|
Loading…
Reference in New Issue
Block a user