mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Bot previews
This commit is contained in:
@@ -287,6 +287,11 @@ public final class AccountStateManager {
|
||||
return self.storyUpdatesPipe.signal()
|
||||
}
|
||||
|
||||
fileprivate let botPreviewUpdatesPipe = ValuePipe<[InternalBotPreviewUpdate]>()
|
||||
public var botPreviewUpdates: Signal<[InternalBotPreviewUpdate], NoError> {
|
||||
return self.botPreviewUpdatesPipe.signal()
|
||||
}
|
||||
|
||||
private var updatedWebpageContexts: [MediaId: UpdatedWebpageSubscriberContext] = [:]
|
||||
private var updatedPeersNearbyContext = UpdatedPeersNearbySubscriberContext()
|
||||
private var updatedRevenueBalancesContext = UpdatedRevenueBalancesSubscriberContext()
|
||||
@@ -1856,6 +1861,18 @@ public final class AccountStateManager {
|
||||
}
|
||||
}
|
||||
|
||||
var botPreviewUpdates: Signal<[InternalBotPreviewUpdate], NoError> {
|
||||
return self.impl.signalWith { impl, subscriber in
|
||||
return impl.botPreviewUpdates.start(next: subscriber.putNext, error: subscriber.putError, completed: subscriber.putCompletion)
|
||||
}
|
||||
}
|
||||
|
||||
func injectBotPreviewUpdates(updates: [InternalBotPreviewUpdate]) {
|
||||
self.impl.with { impl in
|
||||
impl.botPreviewUpdatesPipe.putNext(updates)
|
||||
}
|
||||
}
|
||||
|
||||
var updateConfigRequested: (() -> Void)?
|
||||
var isPremiumUpdated: (() -> Void)?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user