From 8dd1843b3de30fb26b608e7a5f1b02c0b010f9dd Mon Sep 17 00:00:00 2001 From: telami Date: Tue, 28 Mar 2023 00:40:07 +0800 Subject: [PATCH] Refactor make it possible to pass in the uuid before the show so that it can turn itself off in view based on the uuid --- .../ContainerManager/ContainerManager.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/SwiftUIOverlayContainer/ContainerManager/ContainerManager.swift b/Sources/SwiftUIOverlayContainer/ContainerManager/ContainerManager.swift index a39570b..579106e 100644 --- a/Sources/SwiftUIOverlayContainer/ContainerManager/ContainerManager.swift +++ b/Sources/SwiftUIOverlayContainer/ContainerManager/ContainerManager.swift @@ -155,7 +155,7 @@ extension ContainerManager: ContainerViewManagementForEnvironment { using configuration: ContainerViewConfigurationProtocol, animated: Bool = true ) -> UUID? where Content: View { - _show(view: view, in: container, using: configuration, isPresented: nil, animated: animated) + _show(view: view, with: ID, in: container, using: configuration, isPresented: nil, animated: animated) } /// Push ContainerView to specific overlay container @@ -169,7 +169,7 @@ extension ContainerManager: ContainerViewManagementForEnvironment { in container: String, animated: Bool = true ) -> UUID? where Content: ContainerView { - _show(view: containerView, in: container, using: containerView, isPresented: nil, animated: animated) + _show(view: containerView, with: ID, in: container, using: containerView, isPresented: nil, animated: animated) } /// Dismiss a specific view in a specific container