Skip to content

Commit

Permalink
feat: make FavoriteType to conform to Identifiable protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
makinosp committed Oct 5, 2024
1 parent cc96439 commit af2df8a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/VRCKit/Models/Favorite/FavoriteModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ public enum FavoriteType: String, Codable, Sendable, CaseIterable {
case world, avatar, friend
}

extension FavoriteType: Identifiable {
public var id: Int { hashValue }
}

@MemberwiseInit(.public)
public struct Favorite: Codable, Sendable, Identifiable {
public let id: String
Expand Down

0 comments on commit af2df8a

Please sign in to comment.