From f93abb0f644ae903818e6b7a3308e44acd389bcd Mon Sep 17 00:00:00 2001 From: Chikato Takenouchi <46619995+Take111@users.noreply.github.com> Date: Thu, 30 Jan 2025 01:38:38 +0900 Subject: [PATCH] Fix Navigation Issue in AnimationListView in the Sample Project (#2528) --- Example/Example/AnimationListView.swift | 32 ++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Example/Example/AnimationListView.swift b/Example/Example/AnimationListView.swift index a57907208c..f9b7b90147 100644 --- a/Example/Example/AnimationListView.swift +++ b/Example/Example/AnimationListView.swift @@ -40,25 +40,25 @@ struct AnimationListView: View { .frame(height: 50) } } - .navigationDestination(for: Item.self) { item in - switch item { - case .animation(_, let animationPath): - AnimationPreviewView(animationSource: .local(animationPath: animationPath)) - case .remoteAnimations(let name, let urls): - AnimationPreviewView(animationSource: .remote(urls: urls, name: name)) - case .animationList(let listContent): - AnimationListView(content: listContent) - case .controlsDemo: - ControlsDemoView() - case .swiftUIInteroperability: - SwiftUIInteroperabilityDemoView() - case .lottieViewLayoutDemo: - LottieViewLayoutDemoView() - } - } } } .navigationTitle(content.name) + .navigationDestination(for: Item.self) { item in + switch item { + case .animation(_, let animationPath): + AnimationPreviewView(animationSource: .local(animationPath: animationPath)) + case .remoteAnimations(let name, let urls): + AnimationPreviewView(animationSource: .remote(urls: urls, name: name)) + case .animationList(let listContent): + AnimationListView(content: listContent) + case .controlsDemo: + ControlsDemoView() + case .swiftUIInteroperability: + SwiftUIInteroperabilityDemoView() + case .lottieViewLayoutDemo: + LottieViewLayoutDemoView() + } + } } func makeThumbnailAnimation(for item: Item) async throws -> LottieAnimationSource? {