mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various improvements
This commit is contained in:
parent
4b785835ee
commit
c445821e6e
@ -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))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user