Fix some warnings (IOS-192)

As relationship-information isn't optional anymore, there' no need for ?? everywhere (I just missed some)
This commit is contained in:
Nathan Mattes 2023-12-30 12:30:27 +01:00
parent 0f6f6adfba
commit 8e7e16870c
3 changed files with 3 additions and 3 deletions

View File

@ -204,7 +204,7 @@ extension ProfileHeaderView.ViewModel {
guard let relationship else { return nil }
let isBlocking = relationship.blocking
let isBlockedBy = relationship.blockedBy ?? false
let isBlockedBy = relationship.blockedBy
let isSuspended = account.suspended ?? false
let isNeedsHidden = isBlocking || isBlockedBy || isSuspended

View File

@ -269,7 +269,7 @@ public extension UserView {
buttonState = .unfollow
} else if relationship.blocking || relationship.domainBlocking {
buttonState = .blocked
} else if relationship.requested ?? false {
} else if relationship.requested {
buttonState = .pending
} else {
buttonState = .follow

View File

@ -73,7 +73,7 @@ extension ProfileRelationshipActionButton {
} else if relationship.domainBlocking {
#warning("Wait for #1198 (Domain Block, IOS-5) to be merged")
title = "Unblock domain"
} else if (relationship.requested ?? false) {
} else if relationship.requested {
title = L10n.Common.Controls.Friendship.pending
} else if relationship.muting {
title = L10n.Common.Controls.Friendship.muted