Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion resources/ios/NativeUIDrawerHost.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ struct NativeDrawerHost<Content: View>: View {

@ObservedObject private var state = DrawerHostState.shared
@Environment(\.accessibilityReduceMotion) private var reduceMotion
@Environment(\.nativeUITheme) private var theme
@ObservedObject private var themeStore = NativeUITheme.shared
@Environment(\.colorScheme) private var colorScheme
@State private var dragOffset: CGFloat = 0
// The last drawer this host drew — see `panelNode`.
@State private var lastDrawer = LastDrawer()
Expand All @@ -86,6 +87,8 @@ struct NativeDrawerHost<Content: View>: View {
/// Slide animation for the drawer. Suppressed when the user has Reduce
/// Motion enabled — open/close state then applies instantly instead of
/// sliding (`withAnimation(nil)` / `.animation(nil, value:)`).
private var theme: NativeUITokens { themeStore.resolve(for: colorScheme) }

private var drawerAnimation: Animation? {
reduceMotion ? nil : .easeOut(duration: 0.25)
}
Expand Down