Fix build
This commit is contained in:
parent
ed7de63eb7
commit
52f5458364
|
@ -27,7 +27,7 @@ extension DataSourceFacade {
|
||||||
)
|
)
|
||||||
|
|
||||||
let userInfo = [
|
let userInfo = [
|
||||||
.relationship: response.value,
|
UserInfoKey.relationship: response.value,
|
||||||
]
|
]
|
||||||
|
|
||||||
NotificationCenter.default.post(name: .relationshipChanged, object: self, userInfo: userInfo)
|
NotificationCenter.default.post(name: .relationshipChanged, object: self, userInfo: userInfo)
|
||||||
|
|
|
@ -27,7 +27,7 @@ extension DataSourceFacade {
|
||||||
dependency.context.authenticationService.fetchFollowingAndBlockedAsync()
|
dependency.context.authenticationService.fetchFollowingAndBlockedAsync()
|
||||||
|
|
||||||
NotificationCenter.default.post(name: .relationshipChanged, object: nil, userInfo: [
|
NotificationCenter.default.post(name: .relationshipChanged, object: nil, userInfo: [
|
||||||
.relationship: response
|
UserInfoKey.relationship: response
|
||||||
])
|
])
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
@ -75,7 +75,7 @@ extension DataSourceFacade {
|
||||||
}
|
}
|
||||||
|
|
||||||
NotificationCenter.default.post(name: .relationshipChanged, object: nil, userInfo: [
|
NotificationCenter.default.post(name: .relationshipChanged, object: nil, userInfo: [
|
||||||
.relationship: newRelationship
|
UserInfoKey.relationship: newRelationship
|
||||||
])
|
])
|
||||||
|
|
||||||
await notificationView.configure(notification: notification, authenticationBox: dependency.authContext.mastodonAuthenticationBox)
|
await notificationView.configure(notification: notification, authenticationBox: dependency.authContext.mastodonAuthenticationBox)
|
||||||
|
@ -115,7 +115,7 @@ extension DataSourceFacade {
|
||||||
)
|
)
|
||||||
|
|
||||||
let userInfo = [
|
let userInfo = [
|
||||||
.relationship: newRelationship,
|
UserInfoKey.relationship: newRelationship,
|
||||||
]
|
]
|
||||||
|
|
||||||
NotificationCenter.default.post(name: .relationshipChanged, object: self, userInfo: userInfo)
|
NotificationCenter.default.post(name: .relationshipChanged, object: self, userInfo: userInfo)
|
||||||
|
|
|
@ -23,7 +23,7 @@ extension DataSourceFacade {
|
||||||
)
|
)
|
||||||
|
|
||||||
let userInfo = [
|
let userInfo = [
|
||||||
.relationship: response.value,
|
UserInfoKey.relationship: response.value,
|
||||||
]
|
]
|
||||||
|
|
||||||
NotificationCenter.default.post(name: .relationshipChanged, object: self, userInfo: userInfo)
|
NotificationCenter.default.post(name: .relationshipChanged, object: self, userInfo: userInfo)
|
||||||
|
|
|
@ -57,7 +57,7 @@ extension ProfileCardView.ViewModel {
|
||||||
private func bindHeader(view: ProfileCardView) {
|
private func bindHeader(view: ProfileCardView) {
|
||||||
$authorBannerImageURL
|
$authorBannerImageURL
|
||||||
.sink { url in
|
.sink { url in
|
||||||
guard let url = url, !url.absoluteString.hasSuffix("missing.png") else {
|
guard let url = url, !url.absoluteString.hasSuffix(Mastodon.Entity.Account.missingImageName) else {
|
||||||
view.bannerImageView.image = .placeholder(color: .systemGray3)
|
view.bannerImageView.image = .placeholder(color: .systemGray3)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -833,7 +833,7 @@ extension ProfileViewController: ProfileHeaderViewControllerDelegate {
|
||||||
|
|
||||||
// we need to trigger this here as domain block doesn't return a relationship
|
// we need to trigger this here as domain block doesn't return a relationship
|
||||||
let userInfo = [
|
let userInfo = [
|
||||||
.relationship: newRelationship,
|
UserInfoKey.relationship: newRelationship,
|
||||||
]
|
]
|
||||||
|
|
||||||
NotificationCenter.default.post(name: .relationshipChanged, object: self, userInfo: userInfo)
|
NotificationCenter.default.post(name: .relationshipChanged, object: self, userInfo: userInfo)
|
||||||
|
@ -1002,7 +1002,7 @@ extension ProfileViewController {
|
||||||
@objc
|
@objc
|
||||||
func relationshipChanged(_ notification: Notification) {
|
func relationshipChanged(_ notification: Notification) {
|
||||||
|
|
||||||
guard let userInfo = notification.userInfo, let relationship = userInfo[.relationship] as? Mastodon.Entity.Relationship else {
|
guard let userInfo = notification.userInfo, let relationship = userInfo[UserInfoKey.relationship] as? Mastodon.Entity.Relationship else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ extension Notification.Name {
|
||||||
public static let relationshipChanged = Notification.Name(rawValue: "org.joinmastodon.app.relationship-changed")
|
public static let relationshipChanged = Notification.Name(rawValue: "org.joinmastodon.app.relationship-changed")
|
||||||
}
|
}
|
||||||
|
|
||||||
extension AnyHashable {
|
public enum UserInfoKey {
|
||||||
public static let relationship = "relationship"
|
public static let relationship = "relationship"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue