diff --git a/submodules/TelegramUI/Components/Stories/StoryPeerListComponent/Sources/StoryPeerListComponent.swift b/submodules/TelegramUI/Components/Stories/StoryPeerListComponent/Sources/StoryPeerListComponent.swift index 91411f1971..acf1863c49 100644 --- a/submodules/TelegramUI/Components/Stories/StoryPeerListComponent/Sources/StoryPeerListComponent.swift +++ b/submodules/TelegramUI/Components/Stories/StoryPeerListComponent/Sources/StoryPeerListComponent.swift @@ -797,7 +797,11 @@ public final class StoryPeerListComponent: Component { var overscrollFocusIndex: Int? for i in 0 ..< self.sortedItems.count { - if self.sortedItems[i].peer.id != component.context.account.peerId { + if self.sortedItems[i].peer.id == component.context.account.peerId { + continue + } + let itemFrame = itemLayout.frame(at: i) + if effectiveVisibleBounds.contains(itemFrame) { overscrollFocusIndex = i break }