mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Fix story info refresh
This commit is contained in:
parent
9679e1b3df
commit
f2ea507456
@ -880,14 +880,26 @@ public final class StoryContentContextImpl: StoryContentContext {
|
||||
var possibleItems: [(EnginePeer, EngineStoryItem)] = []
|
||||
var pollItems: [StoryKey] = []
|
||||
if let slice = currentState.centralPeerContext.sliceValue {
|
||||
var shouldPollItem = false
|
||||
if slice.peer.id == self.context.account.peerId {
|
||||
shouldPollItem = true
|
||||
} else if case .channel = slice.peer {
|
||||
shouldPollItem = true
|
||||
}
|
||||
if shouldPollItem {
|
||||
pollItems.append(StoryKey(peerId: slice.peer.id, id: slice.item.storyItem.id))
|
||||
}
|
||||
|
||||
for item in currentState.centralPeerContext.nextItems {
|
||||
possibleItems.append((slice.peer, item))
|
||||
|
||||
var shouldPollNextItem = false
|
||||
if slice.peer.id == self.context.account.peerId {
|
||||
shouldPollNextItem = true
|
||||
} else if case .channel = slice.peer {
|
||||
shouldPollNextItem = true
|
||||
}
|
||||
if shouldPollNextItem {
|
||||
pollItems.append(StoryKey(peerId: slice.peer.id, id: item.id))
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user