Signed-off-by: alex-z <blackslayer4@gmail.com>
void Folder::switchToVirtualFiles()
{
SyncEngine::switchToVirtualFiles(path(), _journal, *_vfs);
+ _hasSwitchedToVfs = true;
+}
+
+void Folder::processSwitchedToVirtualFiles()
+{
+ if (_hasSwitchedToVfs) {
+ _hasSwitchedToVfs = false;
+ saveToSettings();
+ }
}
bool Folder::supportsSelectiveSync() const
void switchToVirtualFiles();
+ void processSwitchedToVirtualFiles();
+
/** Whether this folder should show selective sync ui */
bool supportsSelectiveSync() const;
*/
bool _vfsOnOffPending = false;
+ /** Whether this folder has just switched to VFS or not
+ */
+ bool _hasSwitchedToVfs = false;
+
/**
* Watches this folder's local directory for changes.
*
emit folderListChanged(_folderMap);
+ for (const auto folder : _folderMap) {
+ folder->processSwitchedToVirtualFiles();
+ }
+
return _folderMap.size();
}