mirror of
https://github.com/mastodon/mastodon-ios
synced 2025-04-11 22:58:02 +02:00
Fix warnings (IOS-192)
This commit is contained in:
parent
f241232972
commit
c0e08c4482
@ -316,9 +316,9 @@ extension ProfileCardView {
|
||||
buttonState = .none
|
||||
} else if relationship.following {
|
||||
buttonState = .unfollow
|
||||
} else if relationship.blocking || (relationship.domainBlocking ?? false) {
|
||||
} else if relationship.blocking || relationship.domainBlocking {
|
||||
buttonState = .blocked
|
||||
} else if relationship.requested ?? false {
|
||||
} else if relationship.requested {
|
||||
buttonState = .pending
|
||||
} else {
|
||||
buttonState = .follow
|
||||
|
@ -133,7 +133,7 @@ extension ProfileHeaderView.ViewModel {
|
||||
.compactMap { relationship in
|
||||
guard let relationship else { return false }
|
||||
|
||||
return relationship.blocking || (relationship.blockedBy ?? false)
|
||||
return relationship.blocking || relationship.blockedBy
|
||||
}
|
||||
.sink { needsImageOverlayBlurred in
|
||||
UIView.animate(withDuration: 0.33) {
|
||||
|
@ -420,14 +420,14 @@ extension ProfileViewController {
|
||||
let name = user.displayNameWithFallback
|
||||
|
||||
var menuActions: [MastodonMenu.Action] = [
|
||||
.muteUser(.init(name: name, isMuting: relationship.muting ?? false)),
|
||||
.muteUser(.init(name: name, isMuting: relationship.muting)),
|
||||
.blockUser(.init(name: name, isBlocking: relationship.blocking)),
|
||||
.reportUser(.init(name: name)),
|
||||
.shareUser(.init(name: name)),
|
||||
]
|
||||
|
||||
if relationship.following {
|
||||
let showReblogs = relationship.showingReblogs ?? false// me.showingReblogsBy.contains(user)
|
||||
let showReblogs = relationship.showingReblogs// me.showingReblogsBy.contains(user)
|
||||
let context = MastodonMenu.HideReblogsActionContext(showReblogs: showReblogs)
|
||||
menuActions.insert(.hideReblogs(context), at: 1)
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ extension SearchResultViewController {
|
||||
|
||||
switch item {
|
||||
case .account(let account, relationship: _):
|
||||
await DataSourceFacade.coordinateToProfileScene(provider: self, account: account)
|
||||
DataSourceFacade.coordinateToProfileScene(provider: self, account: account)
|
||||
case .status(let status):
|
||||
await DataSourceFacade.coordinateToStatusThreadScene(
|
||||
provider: self,
|
||||
|
@ -40,7 +40,7 @@ extension APIService {
|
||||
|
||||
let response: Mastodon.Response.Content<Mastodon.Entity.Relationship>
|
||||
|
||||
if relationship.following || (relationship.requested ?? false) {
|
||||
if relationship.following || relationship.requested {
|
||||
// unfollow
|
||||
response = try await Mastodon.API.Account.unfollow(
|
||||
session: session,
|
||||
|
Loading…
x
Reference in New Issue
Block a user