]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java
Data: migrate profile to a private variable, provide methods for accessing it
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / ui / activity / NewTransactionActivity.java
index 24f7f8955c04fcd878486426c47aecfee24f1b30..45e75b5b9b585b3532bf0c6cf76ed849e11abb34 100644 (file)
@@ -39,13 +39,6 @@ import java.util.Objects;
 
 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,
         NewTransactionFragment.OnNewTransactionFragmentInteractionListener {
     private NavController navController;
@@ -57,7 +50,7 @@ public class NewTransactionActivity extends ProfileThemedActivity implements Tas
         setContentView(R.layout.activity_new_transaction);
         Toolbar toolbar = findViewById(R.id.toolbar);
         setSupportActionBar(toolbar);
-        Data.profile.observe(this,
+        Data.observeProfile(this,
                 mobileLedgerProfile -> toolbar.setSubtitle(mobileLedgerProfile.getName()));
 
         navController = Navigation.findNavController(this, R.id.new_transaction_nav);
@@ -93,12 +86,6 @@ public class NewTransactionActivity extends ProfileThemedActivity implements Tas
         }
         return super.onOptionsItemSelected(item);
     }
-
-    @Override
-    protected void onStart() {
-        super.onStart();
-        // FIXME if (tvDescription.getText().toString().isEmpty()) tvDescription.requestFocus();
-    }
     public void onTransactionSave(LedgerTransaction tr) {
         navController.navigate(R.id.action_newTransactionFragment_to_newTransactionSavingFragment);
         try {