package net.ktnx.mobileledger.ui.activity;
-import android.os.AsyncTask;
import android.os.Bundle;
import android.util.TypedValue;
import android.view.Menu;
import android.view.View;
import androidx.appcompat.widget.Toolbar;
-import androidx.lifecycle.ViewModelProviders;
+import androidx.lifecycle.ViewModelProvider;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import static net.ktnx.mobileledger.utils.Logger.debug;
/*
- * TODO: nicer progress while transaction is submitted
* TODO: reports
- * TODO: get rid of the custom session/cookie and auth code?
- * (the last problem with the POST was the missing content-length header)
* */
public class NewTransactionActivity extends ProfileThemedActivity implements TaskCallback,
Objects.requireNonNull(getSupportActionBar())
.setDisplayHomeAsUpEnabled(true);
- model = ViewModelProviders.of(this)
- .get(NewTransactionModel.class);
+ model = new ViewModelProvider(this).get(NewTransactionModel.class);
}
@Override
protected void initProfile() {
model.toggleSimulateSave();
}
- private class AsyncCrasher extends AsyncTask<Void, Void, Void> {
- @Override
- protected Void doInBackground(Void... voids) {
- throw new RuntimeException("Simulated crash");
- }
- }
-
}