mastodon-ios/Mastodon/Protocol/Provider/DataSourceFacade+Reblog.swift

27 lines
711 B
Swift
Raw Normal View History

//
// DataSourceFacade+Reblog.swift
// Mastodon
//
// Created by MainasuK on 2022-1-21.
//
import UIKit
import CoreDataStack
2022-10-08 07:43:06 +02:00
import MastodonCore
import MastodonUI
extension DataSourceFacade {
static func responseToStatusReblogAction(
provider: DataSourceProvider & AuthContextProvider,
status: ManagedObjectRecord<Status>
) async throws {
let selectionFeedbackGenerator = await UISelectionFeedbackGenerator()
await selectionFeedbackGenerator.selectionChanged()
_ = try await provider.context.apiService.reblog(
record: status,
authenticationBox: provider.authContext.mastodonAuthenticationBox
)
} // end func
}