mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 13:05:51 +03:00
Edit locally. Restart current folder sync immediately after file opened.
Signed-off-by: alex-z <blackslayer4@gmail.com>
This commit is contained in:
parent
d4f5081f91
commit
54c13a560d
2 changed files with 10 additions and 0 deletions
|
@ -452,6 +452,7 @@ void EditLocallyJob::startEditLocally()
|
|||
});
|
||||
_folderForFile->setSilenceErrorsUntilNextSync(true);
|
||||
_folderForFile->slotTerminateSync();
|
||||
_shouldScheduleFolderSyncAfterFileIsOpened = true;
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -538,6 +539,8 @@ void EditLocallyJob::slotItemDiscovered(const OCC::SyncFileItemPtr &item)
|
|||
|
||||
void EditLocallyJob::openFile()
|
||||
{
|
||||
Q_ASSERT(_folderForFile);
|
||||
|
||||
if(_localFilePath.isEmpty()) {
|
||||
qCWarning(lcEditLocallyJob) << "Could not edit locally. Invalid local file path.";
|
||||
return;
|
||||
|
@ -553,6 +556,11 @@ void EditLocallyJob::openFile()
|
|||
}
|
||||
|
||||
Systray::instance()->destroyEditFileLocallyLoadingDialog();
|
||||
|
||||
if (_shouldScheduleFolderSyncAfterFileIsOpened) {
|
||||
_folderForFile->startSync();
|
||||
}
|
||||
|
||||
emit finished();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -92,6 +92,8 @@ private:
|
|||
|
||||
bool _tokenVerified = false;
|
||||
|
||||
bool _shouldScheduleFolderSyncAfterFileIsOpened = false;
|
||||
|
||||
AccountStatePtr _accountState;
|
||||
QString _userId;
|
||||
QString _relPath; // full remote path for a file (as on the server)
|
||||
|
|
Loading…
Reference in a new issue