From a5f2bf2334687f766613b1b8b21b3f9d52d07e4c Mon Sep 17 00:00:00 2001 From: CMK Date: Wed, 10 Mar 2021 14:09:38 +0800 Subject: [PATCH] chore: code cleanup --- .../Container/AvatarStackContainerView.swift | 5 +-- .../APIService/APIService+Reblog.swift | 39 ------------------- 2 files changed, 1 insertion(+), 43 deletions(-) diff --git a/Mastodon/Scene/Share/View/Container/AvatarStackContainerView.swift b/Mastodon/Scene/Share/View/Container/AvatarStackContainerView.swift index 361f744bb..ad828d9d2 100644 --- a/Mastodon/Scene/Share/View/Container/AvatarStackContainerView.swift +++ b/Mastodon/Scene/Share/View/Container/AvatarStackContainerView.swift @@ -5,8 +5,8 @@ // Created by MainasuK Cirno on 2021-3-10. // +import os.log import UIKit - final class AvatarStackedImageView: UIImageView { } // MARK: - AvatarConfigurableView @@ -17,9 +17,6 @@ extension AvatarStackedImageView: AvatarConfigurableView { var configurableAvatarButton: UIButton? { nil } } -import os.log -import UIKit - extension UIControl.State: Hashable { } final class AvatarStackContainerButton: UIControl { diff --git a/Mastodon/Service/APIService/APIService+Reblog.swift b/Mastodon/Service/APIService/APIService+Reblog.swift index cfec5c7f4..55b4699ae 100644 --- a/Mastodon/Service/APIService/APIService+Reblog.swift +++ b/Mastodon/Service/APIService/APIService+Reblog.swift @@ -131,42 +131,3 @@ extension APIService { } } - -extension APIService { -// func likeList( -// limit: Int = onceRequestTootMaxCount, -// userID: String, -// maxID: String? = nil, -// mastodonAuthenticationBox: AuthenticationService.MastodonAuthenticationBox -// ) -> AnyPublisher, Error> { -// -// let requestMastodonUserID = mastodonAuthenticationBox.userID -// let query = Mastodon.API.Favorites.ListQuery(limit: limit, minID: nil, maxID: maxID) -// return Mastodon.API.Favorites.favoritedStatus(domain: mastodonAuthenticationBox.domain, session: session, authorization: mastodonAuthenticationBox.userAuthorization, query: query) -// .map { response -> AnyPublisher, Error> in -// let log = OSLog.api -// -// return APIService.Persist.persistTimeline( -// managedObjectContext: self.backgroundManagedObjectContext, -// domain: mastodonAuthenticationBox.domain, -// query: query, -// response: response, -// persistType: .likeList, -// requestMastodonUserID: requestMastodonUserID, -// log: log -// ) -// .setFailureType(to: Error.self) -// .tryMap { result -> Mastodon.Response.Content<[Mastodon.Entity.Status]> in -// switch result { -// case .success: -// return response -// case .failure(let error): -// throw error -// } -// } -// .eraseToAnyPublisher() -// } -// .switchToLatest() -// .eraseToAnyPublisher() -// } -}