From: Olivier Goffart Date: Wed, 19 Aug 2015 15:59:39 +0000 (+0200) Subject: Account Settings: Hide the add folder button when Theme::singleSyncFolder is set X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~1408^2~185 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=92fc902e0c9feeb6f83e867cac866f99ee84a124;p=nextcloud-desktop.git Account Settings: Hide the add folder button when Theme::singleSyncFolder is set --- diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp index cf4b4933a..5435d61e9 100644 --- a/src/gui/folderstatusmodel.cpp +++ b/src/gui/folderstatusmodel.cpp @@ -286,7 +286,11 @@ int FolderStatusModel::columnCount(const QModelIndex&) const int FolderStatusModel::rowCount(const QModelIndex& parent) const { if (!parent.isValid()) { - return _folders.count() + 1; + if( Theme::instance()->singleSyncFolder() && _folders.count() != 0) { + // "Add folder" button not visible in the singleSyncFolder configuration. + return _folders.count(); + } + return _folders.count() + 1; // +1 for the "add folder" button } auto info = infoForIndex(parent); if (!info)