From 9f8c4322a9dff34efc174c74a9a00ae8750def88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=CC=8Cimon=20S=CC=8Cesta=CC=81k?= Date: Fri, 11 Oct 2024 10:07:59 +0200 Subject: [PATCH] ModalCoverModel conform QueueAction --- .../Architecture/ModalCoverModel.swift | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Sources/FuturedArchitecture/Architecture/ModalCoverModel.swift b/Sources/FuturedArchitecture/Architecture/ModalCoverModel.swift index 31705ab..d58b405 100644 --- a/Sources/FuturedArchitecture/Architecture/ModalCoverModel.swift +++ b/Sources/FuturedArchitecture/Architecture/ModalCoverModel.swift @@ -19,11 +19,22 @@ public enum ModalCoverModelStyle { } /// This struct is a model associating presentation style with a destination on a specific ``Coordinator``. -public struct ModalCoverModel: Identifiable { +public struct ModalCoverModel: QueueAction { public let destination: Destination public let style: ModalCoverModelStyle - + public let priority: QueueActionPriority + public var id: Destination.ID { destination.id } + + public init( + destination: Destination, + style: ModalCoverModelStyle, + priority: QueueActionPriority = .normal + ) { + self.destination = destination + self.style = style + self.priority = priority + } }