private SwipeRefreshLayout swiper;
private RecyclerView root;
private ProgressBar progressBar;
- private TransactionListViewModel model;
+ public TransactionListViewModel model;
private TextView tvLastUpdate;
private TransactionListAdapter modelAdapter;
@Override
package net.ktnx.mobileledger.async;
import android.annotation.SuppressLint;
-import android.content.Context;
import android.content.SharedPreferences;
import android.database.sqlite.SQLiteDatabase;
import android.os.AsyncTask;
NetworkUtil.prepare_connection(params[0].getBackendPref(), "journal");
http.setAllowUserInteraction(false);
publishProgress(progress);
- Context ctx = contextRef.get();
+ TransactionListActivity ctx = contextRef.get();
if (ctx == null) return null;
try (SQLiteDatabase db = MLDB.getWritableDatabase(ctx)) {
try (InputStream resp = http.getInputStream()) {
}
}
}
+
+ if (success && !isCancelled()) ctx.model.reloadTransactions(ctx);
}
catch (MalformedURLException e) {
error = R.string.err_bad_backend_url;