From c445821e6e57dc1b16f303863a08b9dc675bf6fc Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Mon, 27 May 2024 13:59:55 +0400 Subject: [PATCH] Various improvements --- .../Sources/StarsTransactionsListPanelComponent.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/submodules/TelegramUI/Components/Stars/StarsTransactionsScreen/Sources/StarsTransactionsListPanelComponent.swift b/submodules/TelegramUI/Components/Stars/StarsTransactionsScreen/Sources/StarsTransactionsListPanelComponent.swift index 09cb1227ff..edc487f092 100644 --- a/submodules/TelegramUI/Components/Stars/StarsTransactionsScreen/Sources/StarsTransactionsListPanelComponent.swift +++ b/submodules/TelegramUI/Components/Stars/StarsTransactionsScreen/Sources/StarsTransactionsListPanelComponent.swift @@ -272,7 +272,9 @@ final class StarsTransactionsListPanelComponent: Component { guard let self, let component = self.component else { return } - component.action(item) + if !item.id.hasPrefix("tmp_") { + component.action(item) + } } )), environment: {}, @@ -341,12 +343,14 @@ final class StarsTransactionsListPanelComponent: Component { return } let wasEmpty = self.items.isEmpty + let hadTemporaryTransactions = self.items.contains(where: { $0.id.hasPrefix("tmp_") }) + self.items = status.transactions if !status.isLoading { self.currentLoadMoreId = nil } if !self.isUpdating { - state?.updated(transition: wasEmpty ? .immediate : .easeInOut(duration: 0.2)) + state?.updated(transition: wasEmpty || hadTemporaryTransactions ? .immediate : .easeInOut(duration: 0.2)) } }) }