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:
parent
0f6f6adfba
commit
8e7e16870c
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue