-reload gifts

This commit is contained in:
Mikhail Filimonov 2025-01-21 09:00:04 +04:00
parent a8fd8c6085
commit 4e287679b7

View File

@ -939,6 +939,12 @@ private final class ProfileGiftsContextImpl {
self.actionDisposable.dispose()
}
func reload() {
gifts = []
dataState = .ready(canLoadMore: true, nextOffset: nil)
self.loadMore()
}
func loadMore() {
let peerId = self.peerId
let accountPeerId = self.account.peerId
@ -1278,6 +1284,12 @@ public final class ProfileGiftsContext {
}
}
public func reload() {
self.impl.with { impl in
impl.reload()
}
}
public func updateStarGiftAddedToProfile(reference: StarGiftReference, added: Bool) {
self.impl.with { impl in
impl.updateStarGiftAddedToProfile(reference: reference, added: added)