From 11561b8be07136fb41719d101b1e8ce90c832b5e Mon Sep 17 00:00:00 2001 From: ChrisBenua Date: Wed, 8 Jan 2025 16:03:24 +0300 Subject: [PATCH 1/2] [trello.com/c/ciHCs1De]: fix update on localization --- Adamant/Modules/Wallets/WalletViewControllerBase.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Adamant/Modules/Wallets/WalletViewControllerBase.swift b/Adamant/Modules/Wallets/WalletViewControllerBase.swift index 0a7d0e0a8..06c6e1925 100644 --- a/Adamant/Modules/Wallets/WalletViewControllerBase.swift +++ b/Adamant/Modules/Wallets/WalletViewControllerBase.swift @@ -156,7 +156,6 @@ class WalletViewControllerBase: FormViewController, WalletViewController { balanceRow.cell.selectionStyle = .gray balanceRow.cellUpdate { (cell, _) in - cell.accessoryType = .disclosureIndicator cell.titleLabel.text = BaseRows.balance.localized }.onCellSelection { [weak self] (_, _) in guard From 55708b9c0520d6a0ebe5cf8db6e6f60854cb8b42 Mon Sep 17 00:00:00 2001 From: ChrisBenua Date: Tue, 7 Jan 2025 20:48:02 +0300 Subject: [PATCH 2/2] [trello.com/c/ciHCs1De]: fix not updating row height after balance change --- .../Wallets/WalletViewControllerBase.swift | 23 ++++--------------- 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/Adamant/Modules/Wallets/WalletViewControllerBase.swift b/Adamant/Modules/Wallets/WalletViewControllerBase.swift index 06c6e1925..b96f0a2b3 100644 --- a/Adamant/Modules/Wallets/WalletViewControllerBase.swift +++ b/Adamant/Modules/Wallets/WalletViewControllerBase.swift @@ -120,6 +120,7 @@ class WalletViewControllerBase: FormViewController, WalletViewController { // MARK: Balance let balanceRow = BalanceRow { [weak self] in + $0.cell.accessoryType = .disclosureIndicator $0.tag = BaseRows.balance.tag $0.cell.titleLabel.text = BaseRows.balance.localized @@ -134,24 +135,9 @@ class WalletViewControllerBase: FormViewController, WalletViewController { alert: self?.service?.core.wallet?.notifications, isBalanceInitialized: self?.service?.core.wallet?.isBalanceInitialized ?? false ) - - let height = $0.value?.fiat != nil ? BalanceTableViewCell.fullHeight : BalanceTableViewCell.compactHeight - - $0.cell.height = { height } - }.cellUpdate { [weak self] (cell, row) in - let symbol = self?.service?.core.tokenSymbol ?? "" - - row.value = self?.balanceRowValueFor( - balance: self?.service?.core.wallet?.balance ?? 0, - symbol: symbol, - alert: self?.service?.core.wallet?.notifications, - isBalanceInitialized: self?.service?.core.wallet?.isBalanceInitialized ?? false - ) - - let height = row.value?.fiat != nil ? BalanceTableViewCell.fullHeight : BalanceTableViewCell.compactHeight - - cell.height = { height } - cell.titleLabel.text = BaseRows.balance.localized + + let row = $0 + $0.cell.height = { row.value?.fiat != nil ? BalanceTableViewCell.fullHeight : BalanceTableViewCell.compactHeight } } balanceRow.cell.selectionStyle = .gray @@ -487,6 +473,7 @@ private extension WalletViewControllerBase { isBalanceInitialized: wallet.isBalanceInitialized ) row.updateCell() + row.reload() } func makeNodesList() -> UIViewController {