diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Payments/StarGifts.swift b/submodules/TelegramCore/Sources/TelegramEngine/Payments/StarGifts.swift index 164a487f41..4e8c628e94 100644 --- a/submodules/TelegramCore/Sources/TelegramEngine/Payments/StarGifts.swift +++ b/submodules/TelegramCore/Sources/TelegramEngine/Payments/StarGifts.swift @@ -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)