Repair SettingsDialog::showIssuesList
authorKevin Ottens <kevin.ottens@nextcloud.com>
Wed, 7 Oct 2020 10:28:31 +0000 (12:28 +0200)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Thu, 22 Oct 2020 14:40:46 +0000 (16:40 +0200)
This was completely disabled code and the connect was gone... So let's
introduce the connect back and have it trigger the main window while
selecting the right user. This way the new activity list is displayed
and since the conflicts are shown at the top this is hopefully obvious
again.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
src/gui/settingsdialog.cpp

index 1722ae9d9afd94625501678f205d637f6a7a0301..e657a4fbcb1b02ea7dbae7a4992ab07f5e9aab37 100644 (file)
@@ -188,13 +188,12 @@ void SettingsDialog::showFirstPage()
     }
 }
 
-void SettingsDialog::showIssuesList(AccountState *account) {
-    /*for (auto it = _actionGroupWidgets.begin(); it != _actionGroupWidgets.end(); ++it) {
-        if (it.value() == _activitySettings[account]) {
-            it.key()->activate(QAction::ActionEvent::Trigger);
-            break;
-        }
-    }*/
+void SettingsDialog::showIssuesList(AccountState *account)
+{
+    const auto userModel = UserModel::instance();
+    const auto id = userModel->findUserIdForAccount(account);
+    UserModel::instance()->switchCurrentUser(id);
+    emit Systray::instance()->showWindow();
 }
 
 void SettingsDialog::accountAdded(AccountState *s)
@@ -229,6 +228,7 @@ void SettingsDialog::accountAdded(AccountState *s)
     connect(accountSettings, &AccountSettings::folderChanged, _gui, &ownCloudGui::slotFoldersChanged);
     connect(accountSettings, &AccountSettings::openFolderAlias,
         _gui, &ownCloudGui::slotFolderOpenAction);
+    connect(accountSettings, &AccountSettings::showIssuesList, this, &SettingsDialog::showIssuesList);
     connect(s->account().data(), &Account::accountChangedAvatar, this, &SettingsDialog::slotAccountAvatarChanged);
     connect(s->account().data(), &Account::accountChangedDisplayName, this, &SettingsDialog::slotAccountDisplayNameChanged);