public class UpdateTransactionsTask extends AsyncTask<String, Void, String> {
protected String doInBackground(String[] filterAccName) {
final MobileLedgerProfile profile = Data.profile.getValue();
public class UpdateTransactionsTask extends AsyncTask<String, Void, String> {
protected String doInBackground(String[] filterAccName) {
final MobileLedgerProfile profile = Data.profile.getValue();
boolean odd = true;
try (Cursor cursor = db.rawQuery(sql, params)) {
while (cursor.moveToNext()) {
boolean odd = true;
try (Cursor cursor = db.rawQuery(sql, params)) {
while (cursor.moveToNext()) {
- boolean showMonth = (date.getMonth() != lastDate.getMonth() ||
- date.getYear() != lastDate.getYear());
- newList.add(new TransactionListItem(date, showMonth));
+ boolean showMonth =
+ (date.get(Calendar.MONTH) != lastDate.get(Calendar.MONTH)) ||
+ (date.get(Calendar.YEAR) != lastDate.get(Calendar.YEAR));
+ newList.add(new TransactionListItem(date.getTime(), showMonth));