Skip to content

Commit

Permalink
ModalCoverModel conform QueueAction
Browse files Browse the repository at this point in the history
  • Loading branch information
Šimon Šesták committed Nov 5, 2024
1 parent 6f672bd commit 9f8c432
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Sources/FuturedArchitecture/Architecture/ModalCoverModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<Destination: Hashable & Identifiable>: Identifiable {
public struct ModalCoverModel<Destination: Hashable & Identifiable>: 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
}
}

0 comments on commit 9f8c432

Please sign in to comment.