From acd1098270a9338db7203d14967176e485a4e802 Mon Sep 17 00:00:00 2001 From: Philippe Weidmann Date: Tue, 18 Apr 2023 11:57:50 +0200 Subject: [PATCH] fix(AppShadowModifier): Prevent breaking view identity + Remove @Environment --- Mail/Utils/AppShadowModifier.swift | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/Mail/Utils/AppShadowModifier.swift b/Mail/Utils/AppShadowModifier.swift index 4579b14c4..dfa16fd47 100644 --- a/Mail/Utils/AppShadowModifier.swift +++ b/Mail/Utils/AppShadowModifier.swift @@ -20,18 +20,11 @@ import MailResources import SwiftUI struct AppShadowModifier: ViewModifier { - @Environment(\.colorScheme) var colorScheme - func body(content: Content) -> some View { - if colorScheme == .light { - ZStack { - MailResourcesAsset.backgroundColor.swiftUIColor - .ignoresSafeArea() - .shadow(color: .primary.opacity(0.08), radius: 2.5, x: 0.5, y: 0.5) - - content - } - } else { + ZStack { + MailResourcesAsset.backgroundColor.swiftUIColor + .ignoresSafeArea() + .shadow(color: .black.opacity(0.08), radius: 2.5, x: 0.5, y: 0.5) content } }