From e060b91947a0b3bbb6109bccfd87f202503ceb6f Mon Sep 17 00:00:00 2001 From: Isaac <> Date: Tue, 29 Apr 2025 17:36:16 +0200 Subject: [PATCH] Fix typo and crash --- .../Sources/StoryItemContentComponent.swift | 2 +- .../Sources/StoryItemSetContainerComponent.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemContentComponent.swift b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemContentComponent.swift index e50d333e51..513d067018 100644 --- a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemContentComponent.swift +++ b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemContentComponent.swift @@ -466,7 +466,7 @@ final class StoryItemContentComponent: Component { return } - var useLegacyImplementation = false + var useLegacyImplementation = true if let data = component.context.currentAppConfiguration.with({ $0 }).data, let value = data["ios_video_legacystoryplayer"] as? Double { useLegacyImplementation = value != 0.0 } diff --git a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift index 27b69c1316..f88ddc8fd8 100644 --- a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift +++ b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift @@ -1875,7 +1875,7 @@ public final class StoryItemSetContainerComponent: Component { continue } var nextVisibleItem: VisibleItem? - if i != component.slice.allItems.count { + if i != component.slice.allItems.count - 1 { nextVisibleItem = self.visibleItems[component.slice.allItems[i + 1].id] } if let itemView = visibleItem.view.view as? StoryItemContentComponent.View {