vfs: Disable selective sync if vfs support is available
authorChristian Kamm <mail@ckamm.de>
Tue, 8 Jan 2019 08:14:38 +0000 (09:14 +0100)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:58:32 +0000 (10:58 +0100)
src/gui/accountsettings.cpp
src/gui/folderstatusmodel.cpp

index b58351e06987546c2deb2bbe01ca7ee637fb6cb9..20f8688f4fa9a612d9d7b24b99ce5702873d1ec0 100644 (file)
@@ -418,7 +418,7 @@ void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
     ac = menu->addAction(tr("Edit Ignored Files"));
     connect(ac, &QAction::triggered, this, &AccountSettings::slotEditCurrentIgnoredFiles);
 
-    if (!_ui->_folderList->isExpanded(index) && !folder->newFilesAreVirtual()) {
+    if (!_ui->_folderList->isExpanded(index) && !folder->supportsVirtualFiles()) {
         ac = menu->addAction(tr("Choose what to sync"));
         ac->setEnabled(folderConnected);
         connect(ac, &QAction::triggered, this, &AccountSettings::doExpand);
index 04db5adef5a48d0c79a0ea0674291dac69dbe299..ddb5fd7c9905cb6cc630eba66ea009466aebd109 100644 (file)
@@ -370,7 +370,7 @@ int FolderStatusModel::rowCount(const QModelIndex &parent) const
     auto info = infoForIndex(parent);
     if (!info)
         return 0;
-    if (info->_folder && info->_folder->newFilesAreVirtual())
+    if (info->_folder && info->_folder->supportsVirtualFiles())
         return 0;
     if (info->hasLabel())
         return 1;
@@ -527,7 +527,7 @@ bool FolderStatusModel::hasChildren(const QModelIndex &parent) const
     if (!info)
         return false;
 
-    if (info->_folder && info->_folder->newFilesAreVirtual())
+    if (info->_folder && info->_folder->supportsVirtualFiles())
         return false;
 
     if (!info->_fetched)
@@ -555,7 +555,7 @@ bool FolderStatusModel::canFetchMore(const QModelIndex &parent) const
         // Keep showing the error to the user, it will be hidden when the account reconnects
         return false;
     }
-    if (info->_folder && info->_folder->newFilesAreVirtual()) {
+    if (info->_folder && info->_folder->supportsVirtualFiles()) {
         // Selective sync is hidden in that case
         return false;
     }