mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fix(widget): open a chat window instead of contacts list in multi-window mode
Closes #3212
This commit is contained in:
parent
431a10f82b
commit
fdf0cbb1e1
|
@ -1188,8 +1188,28 @@ bool Widget::newFriendMessageAlert(int friendId, bool sound)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
currentWindow = window();
|
if (Settings::getInstance().getSeparateWindow())
|
||||||
hasActive = f->getFriendWidget() == activeChatroomWidget;
|
{
|
||||||
|
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))
|
if (newMessageAlert(currentWindow, hasActive, sound))
|
||||||
|
@ -1390,7 +1410,6 @@ void Widget::updateScroll(GenericChatroomWidget *widget) {
|
||||||
ContentDialog* Widget::createContentDialog() const
|
ContentDialog* Widget::createContentDialog() const
|
||||||
{
|
{
|
||||||
ContentDialog* contentDialog = new ContentDialog(settingsWidget);
|
ContentDialog* contentDialog = new ContentDialog(settingsWidget);
|
||||||
contentDialog->show();
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
connect(contentDialog, &ContentDialog::destroyed, &Nexus::getInstance(), &Nexus::updateWindowsClosed);
|
connect(contentDialog, &ContentDialog::destroyed, &Nexus::getInstance(), &Nexus::updateWindowsClosed);
|
||||||
connect(contentDialog, &ContentDialog::windowStateChanged, &Nexus::getInstance(), &Nexus::onWindowStateChanged);
|
connect(contentDialog, &ContentDialog::windowStateChanged, &Nexus::getInstance(), &Nexus::onWindowStateChanged);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user