mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-24 13:25:52 +03:00
Save folder settings to config when force-switching VFS.
Signed-off-by: alex-z <blackslayer4@gmail.com>
This commit is contained in:
parent
1244e96681
commit
3f3b752e44
3 changed files with 19 additions and 0 deletions
|
@ -691,6 +691,15 @@ void Folder::setRootPinState(PinState state)
|
|||
void Folder::switchToVirtualFiles()
|
||||
{
|
||||
SyncEngine::switchToVirtualFiles(path(), _journal, *_vfs);
|
||||
_hasSwitchedToVfs = true;
|
||||
}
|
||||
|
||||
void Folder::processSwitchedToVirtualFiles()
|
||||
{
|
||||
if (_hasSwitchedToVfs) {
|
||||
_hasSwitchedToVfs = false;
|
||||
saveToSettings();
|
||||
}
|
||||
}
|
||||
|
||||
bool Folder::supportsSelectiveSync() const
|
||||
|
|
|
@ -289,6 +289,8 @@ public:
|
|||
|
||||
void switchToVirtualFiles();
|
||||
|
||||
void processSwitchedToVirtualFiles();
|
||||
|
||||
/** Whether this folder should show selective sync ui */
|
||||
bool supportsSelectiveSync() const;
|
||||
|
||||
|
@ -500,6 +502,10 @@ private:
|
|||
*/
|
||||
bool _vfsOnOffPending = false;
|
||||
|
||||
/** Whether this folder has just switched to VFS or not
|
||||
*/
|
||||
bool _hasSwitchedToVfs = false;
|
||||
|
||||
/**
|
||||
* Watches this folder's local directory for changes.
|
||||
*
|
||||
|
|
|
@ -211,6 +211,10 @@ int FolderMan::setupFolders()
|
|||
|
||||
emit folderListChanged(_folderMap);
|
||||
|
||||
for (const auto folder : _folderMap) {
|
||||
folder->processSwitchedToVirtualFiles();
|
||||
}
|
||||
|
||||
return _folderMap.size();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue