File tree Expand file tree Collapse file tree 2 files changed +54
-7
lines changed
Sources/FluidStack/Helper Expand file tree Collapse file tree 2 files changed +54
-7
lines changed Original file line number Diff line number Diff line change @@ -109,15 +109,28 @@ extension UIView {
109109}
110110
111111public struct FluidViewIdentifier : Hashable {
112-
113- public var rawIdentifier : String
114-
112+
113+ public enum Base : Hashable {
114+ case string( String )
115+ case any( AnyHashable )
116+ }
117+
118+ public private( set) var bases : Set < Base >
119+
115120 public init ( _ raw: String ) {
116- self . rawIdentifier = raw
121+ self . bases = . init ( arrayLiteral : . string ( raw) )
117122 }
118123
119- public func combined( _ raw: String ) -> Self {
120- return . init( " \( rawIdentifier) | \( raw) " )
124+ public init ( _ object: some Hashable ) {
125+ self . bases = . init( arrayLiteral: . any( object) )
126+ }
127+
128+ private init ( bases: Set < Base > ) {
129+ self . bases = bases
121130 }
122- }
123131
132+ public consuming func combined( _ other: FluidViewIdentifier ) -> Self {
133+ self . bases = bases. union ( other. bases)
134+ return self
135+ }
136+ }
You can’t perform that action at this time.
0 commit comments