Skip to content

Commit

Permalink
fix(AppShadowModifier): Prevent breaking view identity + Remove @Envi…
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeWeidmann committed Apr 18, 2023
1 parent 2b9557a commit acd1098
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions Mail/Utils/AppShadowModifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit acd1098

Please sign in to comment.