OC-2755: Refresh account shows empty icon sometimes
authormasensio <masensio@solidgear.es>
Wed, 29 Jan 2014 17:38:55 +0000 (18:38 +0100)
committermasensio <masensio@solidgear.es>
Wed, 29 Jan 2014 17:38:55 +0000 (18:38 +0100)
src/com/owncloud/android/ui/activity/FileDisplayActivity.java

index 0eb1966..737810f 100644 (file)
@@ -923,13 +923,7 @@ OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
             RemoteOperationResult synchResult = (RemoteOperationResult)intent.getSerializableExtra(FileSyncService.SYNC_RESULT);
 
             if (getAccount() != null && accountName.equals(getAccount().name)
-                    && mStorageManager != null
-                    ) {  
-
-                /// get the shared files
-                if (isSharedSupported()) {
-                    startGetShares();
-                }
+                    && mStorageManager != null) {
                 
                 String synchFolderRemotePath = intent.getStringExtra(FileSyncService.SYNC_FOLDER_REMOTE_PATH); 
 
@@ -961,6 +955,10 @@ OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
                 }
                 
                 if (!mRefreshSharesInProgress) {
+                    /// get the shared files
+                    if (isSharedSupported()) {
+                        startGetShares();
+                    }
                     setSupportProgressBarIndeterminateVisibility(inProgress);
                 } else {
                     setSupportProgressBarIndeterminateVisibility(true);