Adhere to change request
This commit is contained in:
parent
fc8f3a80ed
commit
5d54b12b1c
@ -66,7 +66,7 @@ protected:
|
||||
|
||||
signals:
|
||||
void moveBack();
|
||||
void trayOptionChanged(const bool value);
|
||||
void trayOptionChanged(bool value);
|
||||
|
||||
private:
|
||||
// Layouts
|
||||
|
@ -94,9 +94,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
pageStack_->setCurrentWidget(chat_page_);
|
||||
});
|
||||
|
||||
connect(userSettingsPage_, &UserSettingsPage::trayOptionChanged, this, [=](const bool value) {
|
||||
trayIcon_->setVisible(value);
|
||||
});
|
||||
connect(userSettingsPage_, SIGNAL(trayOptionChanged(bool)), trayIcon_, SLOT(setVisible(bool)));
|
||||
|
||||
connect(trayIcon_,
|
||||
SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
|
||||
@ -117,7 +115,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
|
||||
QSettings settings;
|
||||
|
||||
trayIcon_->setVisible(settings.value("user/window/tray", true).toBool());
|
||||
trayIcon_->setVisible(userSettings_->isTrayEnabled());
|
||||
|
||||
if (hasActiveUser()) {
|
||||
QString token = settings.value("auth/access_token").toString();
|
||||
@ -259,8 +257,7 @@ MainWindow::showUserSettingsPage()
|
||||
void
|
||||
MainWindow::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
QSettings settings;
|
||||
if (isVisible() && settings.value("user/window/tray", true).toBool()) {
|
||||
if (isVisible() && userSettings_->isTrayEnabled()) {
|
||||
event->ignore();
|
||||
hide();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user