From 0729fa41f2882e788b535f664136e621d92c1fe4 Mon Sep 17 00:00:00 2001 From: Nathan Mattes Date: Sun, 24 Dec 2023 15:20:51 +0100 Subject: [PATCH] Re-enable "Follows you"-indicator (IOS-192) --- .../View/ProfileHeaderView+ViewModel.swift | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Mastodon/Scene/Profile/Header/View/ProfileHeaderView+ViewModel.swift b/Mastodon/Scene/Profile/Header/View/ProfileHeaderView+ViewModel.swift index c0cb383f7..b14e373d5 100644 --- a/Mastodon/Scene/Profile/Header/View/ProfileHeaderView+ViewModel.swift +++ b/Mastodon/Scene/Profile/Header/View/ProfileHeaderView+ViewModel.swift @@ -98,14 +98,15 @@ extension ProfileHeaderView.ViewModel { } .store(in: &disposeBag) // follows you -#warning("TODO: Implement") -// $relationshipActionOptionSet -// .map { $0.contains(.followingBy) && !$0.contains(.isMyself) } -// .receive(on: DispatchQueue.main) -// .sink { isFollowingBy in -// view.followsYouBlurEffectView.isHidden = !isFollowingBy -// } -// .store(in: &disposeBag) + Publishers.CombineLatest($relationship, $isMyself) + .map { relationship, isMyself in + (relationship?.following ?? false) && (isMyself == false) } + .receive(on: DispatchQueue.main) + .sink { isFollowing in + view.followsYouBlurEffectView.isHidden = (isFollowing == false) + } + .store(in: &disposeBag) + // avatar Publishers.CombineLatest4( $avatarImageURL,