Stabilize beta release with warning cleanup and edge-case fixes
This commit is contained in:
@@ -75,8 +75,10 @@ final class ThemeManager: @unchecked Sendable {
|
||||
|
||||
private func updateAppIcon(for theme: AppTheme) {
|
||||
let iconName = theme.alternateIconName
|
||||
guard UIApplication.shared.alternateIconName != iconName else { return }
|
||||
UIApplication.shared.setAlternateIconName(iconName)
|
||||
Task { @MainActor in
|
||||
guard UIApplication.shared.alternateIconName != iconName else { return }
|
||||
UIApplication.shared.setAlternateIconName(iconName)
|
||||
}
|
||||
}
|
||||
|
||||
private init() {
|
||||
@@ -460,11 +462,13 @@ enum Theme {
|
||||
}
|
||||
|
||||
/// Whether the system Reduce Motion preference is enabled.
|
||||
@MainActor
|
||||
static var prefersReducedMotion: Bool {
|
||||
UIAccessibility.isReduceMotionEnabled
|
||||
}
|
||||
|
||||
/// Performs a state change with animation, or instantly if Reduce Motion is enabled.
|
||||
@MainActor
|
||||
static func withMotion(_ animation: SwiftUI.Animation = spring, _ body: () -> Void) {
|
||||
if prefersReducedMotion {
|
||||
body()
|
||||
|
||||
Reference in New Issue
Block a user