From e50040c6a0f2e0d872c959225c2c1c3266c16a02 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Wed, 21 Apr 2021 22:29:09 +0300 Subject: [PATCH] fix updates of last transaction update text --- .../transaction_list/TransactionListLastUpdateRowHolder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } } -- 2.39.5