// Action bar setup
mDirectories = new CustomArrayAdapter<String>(this, R.layout.sherlock_spinner_dropdown_item);
getSupportActionBar().setHomeButtonEnabled(true); // mandatory since Android ICS, according to the official documentation
- setSupportProgressBarIndeterminateVisibility(mSyncInProgress); // always AFTER setContentView(...) ; to work around bug in its implementation
+ setSupportProgressBarIndeterminateVisibility(mSyncInProgress || mRefreshSharesInProgress); // always AFTER setContentView(...) ; to work around bug in its implementation
Log_OC.d(TAG, "onCreate() end");
}
setFile(currentFile);
}
- if (!mRefreshSharesInProgress) {
- /// get the shared files
- if (isSharedSupported()) {
- startGetShares();
- }
- setSupportProgressBarIndeterminateVisibility(inProgress);
- } else {
- setSupportProgressBarIndeterminateVisibility(true);
+ if (synchResult != null && synchResult.isSuccess() && isSharedSupported()) {
+ startGetShares();
}
removeStickyBroadcast(intent);
mSyncInProgress = inProgress;
-
+ setSupportProgressBarIndeterminateVisibility(mSyncInProgress || mRefreshSharesInProgress);
}
if (synchResult != null) {
startService(intent);
mRefreshSharesInProgress = true;
- setSupportProgressBarIndeterminateVisibility(true);
-
}
}