Skip to content

Commit

Permalink
feat: replace FriendPreviewProvider actor to final class
Browse files Browse the repository at this point in the history
  • Loading branch information
makinosp committed Sep 23, 2024
1 parent eb67cb9 commit 3e84739
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Sources/VRCKit/PreviewServices/FriendPreviewService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ public final actor FriendPreviewService: APIService, FriendServiceProtocol {
}

public func fetchFriends(offset: Int, n: Int, offline: Bool) async throws -> [Friend] {
offline ? await PreviewDataProvider.shared.offlineFriends : await PreviewDataProvider.shared.onlineFriends
offline ? PreviewDataProvider.shared.offlineFriends : PreviewDataProvider.shared.onlineFriends
}

public func fetchFriends(count: Int, offline: Bool) async throws -> [Friend] {
offline ? await PreviewDataProvider.shared.offlineFriends : await PreviewDataProvider.shared.onlineFriends
offline ? PreviewDataProvider.shared.offlineFriends : PreviewDataProvider.shared.onlineFriends
}

public func unfriend(id: String) async throws {}
Expand Down
2 changes: 1 addition & 1 deletion Sources/VRCKit/PreviewServices/PreviewDataProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation

public actor PreviewDataProvider {
public final class PreviewDataProvider: Sendable {
typealias FriendSet = (friend: Friend, userDetail: UserDetail)
public static let shared = PreviewDataProvider()
private let previewUserId = UUID()
Expand Down

0 comments on commit 3e84739

Please sign in to comment.