Skip to content

Commit

Permalink
Fix Navigation Issue in AnimationListView in the Sample Project (#2528)
Browse files Browse the repository at this point in the history
  • Loading branch information
Take111 authored Jan 29, 2025
1 parent 44bd9ff commit f93abb0
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions Example/Example/AnimationListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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? {
Expand Down

0 comments on commit f93abb0

Please sign in to comment.