From: Damyan Ivanov Date: Wed, 21 Apr 2021 19:29:09 +0000 (+0300) Subject: fix updates of last transaction update text X-Git-Tag: v0.18.0~65 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=e50040c6a0f2e0d872c959225c2c1c3266c16a02;p=mobile-ledger.git fix updates of last transaction update text --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListLastUpdateRowHolder.java b/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListLastUpdateRowHolder.java index 0d0d3d3f..23382ccf 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListLastUpdateRowHolder.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListLastUpdateRowHolder.java @@ -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); } }