]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/TransactionListActivity.java
make "manually" added account rows look the same as those coming from the layout
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / TransactionListActivity.java
index 9a4ef74eade66afa671cbb9ab5f7104b3a80b60d..2ccb286c1e78a50285c87fc139f16f027292e4fe 100644 (file)
@@ -70,7 +70,7 @@ public class TransactionListActivity extends AppCompatActivity {
         tvLastUpdate = findViewById(R.id.transactions_last_update);
         updateLastUpdateText();
         model = ViewModelProviders.of(this).get(TransactionListViewModel.class);
-        List<LedgerTransaction> transactions = model.getTransactions(getApplicationContext());
+        List<LedgerTransaction> transactions = model.getTransactions(this);
         modelAdapter = new TransactionListAdapter(transactions);
 
         RecyclerView root = findViewById(R.id.transaction_root);
@@ -138,7 +138,7 @@ public class TransactionListActivity extends AppCompatActivity {
     }
 
     public void onRetrieveDone(boolean success) {
-        progressBar.setVisibility(View.GONE);
+        progressBar.setVisibility(View.INVISIBLE);
         swiper.setRefreshing(false);
         updateLastUpdateText();
         if (success) {
@@ -149,7 +149,7 @@ public class TransactionListActivity extends AppCompatActivity {
         {
             long last_update = MLDB.get_option_value(this, MLDB.OPT_TRANSACTION_LIST_STAMP, 0L);
             Log.d("transactions", String.format("Last update = %d", last_update));
-            if (last_update == 0) tvLastUpdate.setText("never");
+            if (last_update == 0) tvLastUpdate.setText(getString(R.string.transaction_last_update_never));
             else {
                 Date date = new Date(last_update);
                 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {