mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 21:15:55 +03:00
Fix duplicate items in Apps menu (a bug introduced in #1477)
Signed-off-by: Sergey Zolotarev <sryze@protonmail.com>
This commit is contained in:
parent
b184cba953
commit
9a11bef263
1 changed files with 4 additions and 1 deletions
|
@ -827,6 +827,10 @@ void ownCloudGui::fetchNavigationApps(AccountStatePtr account){
|
|||
|
||||
void ownCloudGui::buildNavigationAppsMenu(AccountStatePtr account, QMenu *accountMenu){
|
||||
auto navLinks = _navApps.value(account);
|
||||
|
||||
_navLinksMenu->clear();
|
||||
_navLinksMenu->setEnabled(navLinks.size() > 0);
|
||||
|
||||
if(navLinks.size() > 0){
|
||||
// when there is only one account add the nav links above the settings
|
||||
QAction *actionBefore = _actionSettings;
|
||||
|
@ -853,7 +857,6 @@ void ownCloudGui::buildNavigationAppsMenu(AccountStatePtr account, QMenu *accoun
|
|||
connect(action, &QAction::triggered, this, [href] { QDesktopServices::openUrl(href); });
|
||||
_navLinksMenu->addAction(action);
|
||||
}
|
||||
_navLinksMenu->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue