Account Settings: hide the [add folder] button when syncing the entire owncloud #3438

This commit is contained in:
Olivier Goffart 2015-07-13 16:28:21 +02:00
parent cd64d3ae2c
commit 6030b4416d

View file

@ -244,6 +244,11 @@ int FolderStatusModel::columnCount(const QModelIndex&) const
int FolderStatusModel::rowCount(const QModelIndex& parent) const
{
if (!parent.isValid()) {
if (_folders.count() == 1 && _folders.at(0)._folder->remotePath() == QLatin1String("/")) {
// special case when syncing the entire owncloud: hide the add folder button (#3438)
return 1;
}
return _folders.count() + 1;
}