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,8 +272,10 @@ final class StarsTransactionsListPanelComponent: Component {
|
|||||||
guard let self, let component = self.component else {
|
guard let self, let component = self.component else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if !item.id.hasPrefix("tmp_") {
|
||||||
component.action(item)
|
component.action(item)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
)),
|
)),
|
||||||
environment: {},
|
environment: {},
|
||||||
containerSize: CGSize(width: itemLayout.containerWidth, height: itemLayout.itemHeight)
|
containerSize: CGSize(width: itemLayout.containerWidth, height: itemLayout.itemHeight)
|
||||||
@ -341,12 +343,14 @@ final class StarsTransactionsListPanelComponent: Component {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
let wasEmpty = self.items.isEmpty
|
let wasEmpty = self.items.isEmpty
|
||||||
|
let hadTemporaryTransactions = self.items.contains(where: { $0.id.hasPrefix("tmp_") })
|
||||||
|
|
||||||
self.items = status.transactions
|
self.items = status.transactions
|
||||||
if !status.isLoading {
|
if !status.isLoading {
|
||||||
self.currentLoadMoreId = nil
|
self.currentLoadMoreId = nil
|
||||||
}
|
}
|
||||||
if !self.isUpdating {
|
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