Skip to content
Snippets Groups Projects
Commit 72cba5d9 authored by Konstantinos Sideris's avatar Konstantinos Sideris
Browse files

Disable minimize to tray except for the ChatPage

parent 4098cf67
No related branches found
No related tags found
No related merge requests found
......@@ -226,7 +226,11 @@ MainWindow::showChatPage(QString userid, QString homeserver, QString token)
void
MainWindow::closeEvent(QCloseEvent *event)
{
if (isVisible() && userSettings_->isTrayEnabled()) {
// Decide whether or not we should enable tray for the current page.
bool pageSupportsTray =
!welcome_page_->isVisible() && !login_page_->isVisible() && !register_page_->isVisible();
if (isVisible() && pageSupportsTray && userSettings_->isTrayEnabled()) {
event->ignore();
hide();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment