From 866dfca710db2ffa22eaf6ada8dcd3ac9240505f Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Mar 2026 03:07:46 +0000 Subject: [PATCH] fix: rename _transactions to allTransactions to fix ktlint backing-property-naming The backing property _transactions no longer has a matching public property since it was replaced by filteredTransactions. https://claude.ai/code/session_01CdNY7qYDRHJr1jhAFvVgzj --- .../ui/screen/loggedIn/wallet/WalletViewModel.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/wallet/WalletViewModel.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/wallet/WalletViewModel.kt index ceb1fbd774..172d6835eb 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/wallet/WalletViewModel.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/wallet/WalletViewModel.kt @@ -90,13 +90,13 @@ class WalletViewModel : ViewModel() { private val _walletAlias = MutableStateFlow(null) val walletAlias = _walletAlias.asStateFlow() - private val _transactions = MutableStateFlow>(emptyList()) + private val allTransactions = MutableStateFlow>(emptyList()) private val _transactionFilter = MutableStateFlow(TransactionFilter.ALL) val transactionFilter = _transactionFilter.asStateFlow() val filteredTransactions = - combine(_transactions, _transactionFilter) { txs, filter -> + combine(allTransactions, _transactionFilter) { txs, filter -> when (filter) { TransactionFilter.ALL -> txs TransactionFilter.ZAPS -> txs.filter { it.parsedMetadata()?.nostr != null } @@ -196,7 +196,7 @@ class WalletViewModel : ViewModel() { when (response) { is ListTransactionsSuccessResponse -> { val txs = response.result?.transactions ?: emptyList() - _transactions.value = txs + allTransactions.value = txs val totalCount = response.result?.total_count _hasMoreTransactions.value = if (totalCount != null) { @@ -224,7 +224,7 @@ class WalletViewModel : ViewModel() { fun loadMoreTransactions() { if (_isLoadingMore.value || !_hasMoreTransactions.value) return val acc = account ?: return - val currentOffset = _transactions.value.size + val currentOffset = allTransactions.value.size viewModelScope.launch(Dispatchers.IO) { _isLoadingMore.value = true try { @@ -238,11 +238,11 @@ class WalletViewModel : ViewModel() { when (response) { is ListTransactionsSuccessResponse -> { val newTxs = response.result?.transactions ?: emptyList() - _transactions.value = _transactions.value + newTxs + allTransactions.value = allTransactions.value + newTxs val totalCount = response.result?.total_count _hasMoreTransactions.value = if (totalCount != null) { - _transactions.value.size < totalCount + allTransactions.value.size < totalCount } else { newTxs.size >= pageSize }