]> git.ktnx.net Git - mobile-ledger.git/commitdiff
correctly get the last transaction list update option
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 15 Dec 2018 19:33:13 +0000 (19:33 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 15 Dec 2018 19:33:13 +0000 (19:33 +0000)
the default needs to be written as 0L (long) so that the correct method is used

app/src/main/java/net/ktnx/mobileledger/TransactionListActivity.java

index fcaf9d5f9bc48ee3d64f616c820ee5362b27aa21..497a1d2eba28259ad3b691588b5ac23b2f7e5203 100644 (file)
@@ -69,8 +69,8 @@ public class TransactionListActivity extends AppCompatActivity {
             throw new RuntimeException("Can't get hold on the transaction list progress bar");
         tvLastUpdate = findViewById(R.id.transactions_last_update);
         {
-            long last_update = (new MobileLedgerDatabase(this))
-                    .get_option_value("transaction_list_last_update", 0);
+            long last_update = dbh.get_option_value("transaction_list_last_update", 0L);
+            Log.d("transactions", String.format("Last update = %d", last_update));
             if (last_update == 0) tvLastUpdate.setText("never");
             else {
                 Date date = new Date(last_update);