]> git.ktnx.net Git - mobile-ledger.git/commitdiff
fix updates of last transaction update text
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Wed, 21 Apr 2021 19:29:09 +0000 (22:29 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Wed, 21 Apr 2021 19:29:09 +0000 (22:29 +0300)
app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListLastUpdateRowHolder.java

index 0d0d3d3fb637bbf29217a6cd9f84d0fbb416a826..23382ccf461ae5646d638d718904725c7031401a 100644 (file)
@@ -19,6 +19,7 @@ package net.ktnx.mobileledger.ui.transaction_list;
 
 import net.ktnx.mobileledger.databinding.LastUpdateLayoutBinding;
 import net.ktnx.mobileledger.model.Data;
+import net.ktnx.mobileledger.ui.activity.MainActivity;
 
 class TransactionListLastUpdateRowHolder extends TransactionRowHolderBase {
     private final LastUpdateLayoutBinding b;
@@ -30,6 +31,7 @@ class TransactionListLastUpdateRowHolder extends TransactionRowHolderBase {
         b.lastUpdateText.setText(text);
     }
     public void bind() {
-        b.lastUpdateText.setText(Data.lastTransactionsUpdateText.getValue());
+        Data.lastTransactionsUpdateText.observe((MainActivity) b.lastUpdateText.getContext(),
+                b.lastUpdateText::setText);
     }
 }