mirror of
https://github.com/mastodon/mastodon-ios
synced 2025-04-11 22:58:02 +02:00
Remove obsolete wrapper-code
This commit is contained in:
parent
ab7b0584dd
commit
a6aa4291f6
@ -23,14 +23,8 @@ extension APIService {
|
||||
|
||||
@discardableResult
|
||||
public func getBlocked(
|
||||
authenticationBox: MastodonAuthenticationBox
|
||||
) async throws -> Mastodon.Response.Content<[Mastodon.Entity.Account]> {
|
||||
try await _getBlocked(sinceID: nil, limit: nil, authenticationBox: authenticationBox)
|
||||
}
|
||||
|
||||
private func _getBlocked(
|
||||
sinceID: Mastodon.Entity.Status.ID?,
|
||||
limit: Int?,
|
||||
sinceID: Mastodon.Entity.Status.ID? = nil,
|
||||
limit: Int? = nil,
|
||||
authenticationBox: MastodonAuthenticationBox
|
||||
) async throws -> Mastodon.Response.Content<[Mastodon.Entity.Account]> {
|
||||
let managedObjectContext = backgroundManagedObjectContext
|
||||
@ -42,21 +36,6 @@ extension APIService {
|
||||
authorization: authenticationBox.userAuthorization
|
||||
).singleOutput()
|
||||
|
||||
let userIDs = response.value.map { $0.id }
|
||||
let predicate = MastodonUser.predicate(domain: authenticationBox.domain, ids: userIDs)
|
||||
|
||||
let fetchRequest = MastodonUser.fetchRequest()
|
||||
fetchRequest.predicate = predicate
|
||||
fetchRequest.includesPropertyValues = false
|
||||
|
||||
try await managedObjectContext.performChanges {
|
||||
let users = try managedObjectContext.fetch(fetchRequest) as! [MastodonUser]
|
||||
|
||||
for user in users {
|
||||
user.deleteStatusAndNotificationFeeds(in: managedObjectContext)
|
||||
}
|
||||
}
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user