2
2
mirror of https://github.com/mastodon/mastodon-ios synced 2025-04-11 22:58:02 +02:00
mastodon-ios/Mastodon/Protocol/Provider/DataSourceFacade+Block.swift

26 lines
668 B
Swift

//
// DataSourceFacade+Block.swift
// Mastodon
//
// Created by MainasuK on 2022-1-24.
//
import UIKit
import CoreDataStack
extension DataSourceFacade {
static func responseToUserBlockAction(
dependency: NeedsDependency,
user: ManagedObjectRecord<MastodonUser>,
authenticationBox: MastodonAuthenticationBox
) async throws {
let selectionFeedbackGenerator = UISelectionFeedbackGenerator()
await selectionFeedbackGenerator.selectionChanged()
_ = try await dependency.context.apiService.toggleBlock(
user: user,
authenticationBox: authenticationBox
)
} // end func
}