Fix some warnings
This commit is contained in:
parent
a20f9a57c2
commit
075b8a739a
|
@ -22,9 +22,6 @@ extension DiscoveryCommunityViewModel {
|
|||
|
||||
override func didEnter(from previousState: GKState?) {
|
||||
super.didEnter(from: previousState)
|
||||
|
||||
let from = previousState.flatMap { String(describing: $0) } ?? "nil"
|
||||
let to = String(describing: self)
|
||||
}
|
||||
|
||||
@MainActor
|
||||
|
|
|
@ -236,7 +236,6 @@ class MastodonLoginViewController: UIViewController, NeedsDependency {
|
|||
let keyboardFrame = keyboardFrameValue.cgRectValue
|
||||
|
||||
let keyboardOrigin = view.convert(keyboardFrame.origin, from: nil)
|
||||
let intersectionY = CGRectGetMaxY(view.frame) - keyboardOrigin.y;
|
||||
|
||||
UIView.animate(withDuration: duration.doubleValue, delay: 0, options: .curveEaseInOut) {
|
||||
self.view.layoutIfNeeded()
|
||||
|
|
|
@ -333,7 +333,7 @@ extension WelcomeViewController {
|
|||
self.authenticationViewModel.isAuthenticating.send(false)
|
||||
|
||||
switch completion {
|
||||
case .failure(let error ):
|
||||
case .failure(_):
|
||||
guard let randomServer = self.viewModel.pickRandomDefaultServer() else { return }
|
||||
|
||||
self.viewModel.randomDefaultServer = randomServer
|
||||
|
|
|
@ -85,7 +85,7 @@ extension ThreadViewModel.LoadThreadState {
|
|||
// assert(!Thread.isMainThread)
|
||||
// await Task.sleep(1_000_000_000) // 1s delay to prevent UI render issue
|
||||
|
||||
let statusHistory = try await viewModel.context.apiService.getHistory(forStatusID: threadContext.statusID,
|
||||
_ = try await viewModel.context.apiService.getHistory(forStatusID: threadContext.statusID,
|
||||
authenticationBox: viewModel.authContext.mastodonAuthenticationBox)
|
||||
|
||||
viewModel.mastodonStatusThreadViewModel.appendAncestor(
|
||||
|
|
|
@ -480,8 +480,6 @@ extension ComposeContentViewModel {
|
|||
)
|
||||
.receive(on: DispatchQueue.main)
|
||||
.map { contentWarning, content, hasPoll, attachments in
|
||||
let canDiscardContentWarning = contentWarning.isEmpty
|
||||
|
||||
let trimmedContent = content.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
let initialContent = self.initialContent.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
let canDiscardContent = trimmedContent.isEmpty || trimmedContent == initialContent
|
||||
|
|
|
@ -5,6 +5,7 @@ import CoreData
|
|||
import CoreDataStack
|
||||
import MastodonCore
|
||||
import MastodonSDK
|
||||
import Combine
|
||||
|
||||
public final class MastodonEditStatusPublisher: NSObject, ProgressReporting {
|
||||
|
||||
|
@ -77,8 +78,6 @@ extension MastodonEditStatusPublisher: StatusPublisher {
|
|||
api: APIService,
|
||||
authContext: AuthContext
|
||||
) async throws -> StatusPublishResult {
|
||||
let idempotencyKey = UUID().uuidString
|
||||
|
||||
let publishStatusTaskStartDelayWeight: Int64 = 20
|
||||
let publishStatusTaskStartDelayCount: Int64 = publishStatusTaskStartDelayWeight
|
||||
|
||||
|
|
Loading…
Reference in New Issue