From 980694cb2441d10d38a585ff094380d853e179f1 Mon Sep 17 00:00:00 2001 From: Yang Xu Date: Sun, 3 Apr 2022 18:07:03 +0800 Subject: [PATCH] improved some code --- .../SwiftUIOverlayContainer/Container/Container.swift | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Sources/SwiftUIOverlayContainer/Container/Container.swift b/Sources/SwiftUIOverlayContainer/Container/Container.swift index 2fbeb41..28b2c24 100644 --- a/Sources/SwiftUIOverlayContainer/Container/Container.swift +++ b/Sources/SwiftUIOverlayContainer/Container/Container.swift @@ -135,12 +135,9 @@ struct OverlayContainer: View { let insets = configuration.insets ZStack(alignment: alignment) { - Group { - if !queueHandler.mainQueue.isEmpty { - background - } - } - .zIndex(1.0) + background + .opacity(queueHandler.mainQueue.isEmpty ? 0 : 1) + .zIndex(1.0) GenericStack(displayType: configuration.displayType, alignment: alignment, spacing: configuration.spacing) { ForEach(queueHandler.mainQueue.alignment(