Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>

This commit is contained in:
Matt Bruce 2025-09-11 16:13:26 -05:00
parent 318701bb3d
commit 14f8c13f3c
2 changed files with 6 additions and 2 deletions

View File

@ -128,7 +128,11 @@ struct OrientationChangeModifier: ViewModifier {
func body(content: Content) -> some View {
content
.onReceive(NotificationCenter.default.publisher(for: UIDevice.orientationDidChangeNotification)) { _ in
orientation = UIDevice.current.orientation
let newOrientation = UIDevice.current.orientation
// Don't update on face down orientation to prevent redraw when putting phone down
if newOrientation != .faceUp && newOrientation != .faceDown {
orientation = newOrientation
}
}
.id(orientation.rawValue) // Force view recreation on orientation change
}

View File

@ -23,7 +23,7 @@ struct TimeDisplayView: View {
let fontWeight: Font.Weight
let fontDesign: Font.Design
let forceHorizontalMode: Bool
@State var fontSize: CGFloat = 1000
@State var fontSize: CGFloat = 100
// MARK: - Formatters
private static let hour24DF: DateFormatter = {