Skip to content

Commit a8797f7

Browse files
committed
update user profile and oc version after refresh events
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
1 parent a4cc4a3 commit a8797f7

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

app/src/main/java/com/owncloud/android/operations/RefreshFolderOperation.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,10 @@ protected RemoteOperationResult run(OwnCloudClient client) {
263263
return new RemoteOperationResult<>(ResultCode.FILE_NOT_FOUND);
264264
}
265265

266-
if (OCFile.ROOT_PATH.equals(mLocalFolder.getRemotePath()) && !mSyncFullAccount && !mOnlyFileMetadata) {
267-
updateOCVersion(client);
268-
updateUserProfile();
269-
}
266+
// Account metadata is refreshed after the folder listing so that it never delays the file list. It is not
267+
// needed to render the folder, and blocking on it adds several sequential requests before the first PROPFIND.
268+
final boolean updateAccountMetadata =
269+
OCFile.ROOT_PATH.equals(mLocalFolder.getRemotePath()) && !mSyncFullAccount && !mOnlyFileMetadata;
270270

271271
result = checkForChanges(client);
272272

@@ -314,6 +314,11 @@ protected RemoteOperationResult run(OwnCloudClient client) {
314314
sendLocalBroadcast(EVENT_SINGLE_FOLDER_SHARES_SYNCED, mLocalFolder.getRemotePath(), result);
315315
}
316316

317+
if (updateAccountMetadata) {
318+
updateOCVersion(client);
319+
updateUserProfile();
320+
}
321+
317322
return result;
318323
}
319324

0 commit comments

Comments
 (0)