Don't let sync with errors report date of 1969

pull/14/head
Tim Su 13 years ago
parent 81fe8a5858
commit d8f08f0b61

@ -139,9 +139,11 @@ abstract public class SyncProviderPreferences extends TodorooPreferenceActivity
new Date(getUtilities().getLastSyncDate()))); new Date(getUtilities().getLastSyncDate())));
} }
} else { } else {
status = r.getString(R.string.sync_status_errors, long lastSyncDate = getUtilities().getLastSyncDate();
String dateString = lastSyncDate > 0 ?
DateUtilities.getDateStringWithTime(SyncProviderPreferences.this, DateUtilities.getDateStringWithTime(SyncProviderPreferences.this,
new Date(getUtilities().getLastSyncDate()))); new Date(lastSyncDate)) : ""; //$NON-NLS-1$
status = r.getString(R.string.sync_status_errors, dateString);
statusColor = Color.rgb(100, 100, 0); statusColor = Color.rgb(100, 100, 0);
} }
preference.setOnPreferenceClickListener(new OnPreferenceClickListener() { preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {

Loading…
Cancel
Save