1515import android .text .TextUtils ;
1616
1717import com .nextcloud .client .account .User ;
18+ import com .nextcloud .client .files .FileIndicator ;
19+ import com .nextcloud .client .files .FileIndicatorManager ;
1820import com .nextcloud .client .jobs .download .FileDownloadHelper ;
1921import com .owncloud .android .datamodel .FileDataStorageManager ;
2022import com .owncloud .android .datamodel .OCFile ;
@@ -132,6 +134,8 @@ protected RemoteOperationResult run(OwnCloudClient client) {
132134 return new RemoteOperationResult <>(ResultCode .FILE_NOT_FOUND );
133135 }
134136
137+ FileIndicatorManager .INSTANCE .update (mLocalFolder .getFileId (), FileIndicator .Syncing );
138+
135139 result = checkForChanges (client );
136140
137141 if (result .isSuccess ()) {
@@ -143,15 +147,18 @@ protected RemoteOperationResult run(OwnCloudClient client) {
143147
144148 if (result .isSuccess ()) {
145149 syncContents (client );
150+ FileIndicatorManager .INSTANCE .update (mLocalFolder .getFileId (), FileIndicator .Synced );
146151 }
147152 }
148153
149154 if (mCancellationRequested .get ()) {
155+ FileIndicatorManager .INSTANCE .update (mLocalFolder .getFileId (), FileIndicator .Error );
150156 throw new OperationCancelledException ();
151157 }
152158
153159 } catch (OperationCancelledException e ) {
154- result = new RemoteOperationResult (e );
160+ FileIndicatorManager .INSTANCE .update (mLocalFolder .getFileId (), FileIndicator .Error );
161+ result = new RemoteOperationResult <>(e );
155162 }
156163
157164 return result ;
0 commit comments