Don't try to autosync tags when not logged in

pull/14/head
Sam Bosley 13 years ago
parent 0ad805648f
commit 65809dc2cc

@ -291,20 +291,22 @@ public class TagViewFragment extends TaskListFragment {
/** refresh the list with latest data from the web */ /** refresh the list with latest data from the web */
private void refreshData(final boolean manual) { private void refreshData(final boolean manual) {
((TextView)taskListView.findViewById(android.R.id.empty)).setText(R.string.DLG_loading); if (actFmPreferenceService.isLoggedIn()) {
((TextView)taskListView.findViewById(android.R.id.empty)).setText(R.string.DLG_loading);
syncService.synchronizeList(tagData, manual, new ProgressBarSyncResultCallback(getActivity(), this, syncService.synchronizeList(tagData, manual, new ProgressBarSyncResultCallback(getActivity(), this,
R.id.progressBar, new Runnable() { R.id.progressBar, new Runnable() {
@Override @Override
public void run() { public void run() {
if (manual) if (manual)
ContextManager.getContext().sendBroadcast(new Intent(AstridApiConstants.BROADCAST_EVENT_REFRESH)); ContextManager.getContext().sendBroadcast(new Intent(AstridApiConstants.BROADCAST_EVENT_REFRESH));
else else
refresh(); refresh();
((TextView)taskListView.findViewById(android.R.id.empty)).setText(R.string.TLA_no_items); ((TextView)taskListView.findViewById(android.R.id.empty)).setText(R.string.TLA_no_items);
} }
})); }));
Preferences.setLong(LAST_FETCH_KEY + tagData.getId(), DateUtilities.now()); Preferences.setLong(LAST_FETCH_KEY + tagData.getId(), DateUtilities.now());
}
} }
protected void setUpMembersGallery() { protected void setUpMembersGallery() {

Loading…
Cancel
Save