Skip to content

Commit

Permalink
Fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitschlag committed Nov 16, 2023
1 parent 9947335 commit d5f05e1
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 24 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ extension APIService {
domain: domain,
authorization: authorization).singleOutput()

let responseHistory = try await Mastodon.API.Statuses.editHistory(
_ = try await Mastodon.API.Statuses.editHistory(
forStatusID: statusID,
session: session,
domain: domain,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ extension NotificationService {
}

private func authenticationBox(for pushNotification: MastodonPushNotification) async throws -> MastodonAuthenticationBox? {
guard let authenticationService = self.authenticationService else { return nil }
guard self.authenticationService != nil else { return nil }
let results = AuthenticationServiceProvider.shared.authentications.filter { $0.userAccessToken == pushNotification.accessToken }
guard let authentication = results.first else { return nil }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extension ComposeContentViewModel: UITextViewDelegate {
switch textView {
case contentMetaText?.textView:
// update model
guard let metaText = self.contentMetaText else {
guard self.contentMetaText != nil else {
assertionFailure()
return
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public final class ComposeContentViewModel: NSObject, ObservableObject {

let recentLanguages = context.settingService.currentSetting.value?.recentLanguages ?? []
self.recentLanguages = recentLanguages
self.language = recentLanguages.first ?? Locale.current.languageCode ?? "en"
self.language = recentLanguages.first ?? Locale.current.language.languageCode.identifier ?? "en"
super.init()
// end init

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extension ComposeContentToolbarView {
@Published var isAttachmentButtonEnabled = false
@Published var isPollButtonEnabled = false

@Published var language = Locale.current.languageCode ?? "en"
@Published var language = Locale.current.language.languageCode?.identifier ?? "en"
@Published var recentLanguages: [String] = []

@Published public var maxTextInputLimit = 500
Expand Down

0 comments on commit d5f05e1

Please sign in to comment.