mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Merge commit 'd2bb1dc57f89b3601a63c75a35f4c083f63bb8a0'
This commit is contained in:
@@ -531,6 +531,10 @@ public extension TelegramEngine {
|
||||
return _internal_removeBotFromAttachMenu(accountPeerId: self.account.peerId, postbox: self.account.postbox, network: self.account.network, botId: botId)
|
||||
}
|
||||
|
||||
public func acceptAttachMenuBotDisclaimer(botId: PeerId) -> Signal<Never, NoError> {
|
||||
return _internal_acceptAttachMenuBotDisclaimer(postbox: self.account.postbox, botId: botId)
|
||||
}
|
||||
|
||||
public func getAttachMenuBot(botId: PeerId, cached: Bool = false) -> Signal<AttachMenuBot, GetAttachMenuBotError> {
|
||||
return _internal_getAttachMenuBot(accountPeerId: self.account.peerId, postbox: self.account.postbox, network: self.account.network, botId: botId, cached: cached)
|
||||
}
|
||||
@@ -771,7 +775,7 @@ public extension TelegramEngine {
|
||||
}
|
||||
|
||||
var accountPendingItemCount = 0
|
||||
if let localState {
|
||||
if let localState = localState {
|
||||
for item in localState.items {
|
||||
if case .myStories = item.target {
|
||||
accountPendingItemCount += 1
|
||||
@@ -880,7 +884,7 @@ public extension TelegramEngine {
|
||||
}
|
||||
}
|
||||
var maxPendingTimestamp: Int32?
|
||||
if let localState {
|
||||
if let localState = localState {
|
||||
for item in localState.items {
|
||||
if case .peer(peerId) = item.target {
|
||||
if let maxPendingTimestampValue = maxPendingTimestamp {
|
||||
@@ -893,7 +897,7 @@ public extension TelegramEngine {
|
||||
}
|
||||
|
||||
var lastItemTimestamp = lastEntry.timestamp
|
||||
if let maxPendingTimestamp, maxPendingTimestamp > lastItemTimestamp {
|
||||
if let maxPendingTimestamp = maxPendingTimestamp, maxPendingTimestamp > lastItemTimestamp {
|
||||
lastItemTimestamp = maxPendingTimestamp
|
||||
}
|
||||
let item = EngineStorySubscriptions.Item(
|
||||
@@ -913,7 +917,7 @@ public extension TelegramEngine {
|
||||
}
|
||||
}
|
||||
|
||||
if let localState {
|
||||
if let localState = localState {
|
||||
for item in localState.items {
|
||||
if case let .peer(peerId) = item.target, !items.contains(where: { $0.peer.id == peerId }) {
|
||||
guard let peerView = views.views[PostboxViewKey.basicPeer(peerId)] as? BasicPeerView else {
|
||||
|
||||
Reference in New Issue
Block a user