From 393722a31da64134b6cda97d774e26d482057fc6 Mon Sep 17 00:00:00 2001 From: Nathan Mattes Date: Mon, 25 Dec 2023 23:42:49 +0100 Subject: [PATCH] Reenable followers/followees (IOS-192) --- .../Header/ProfileHeaderViewController.swift | 64 +++++++++---------- 1 file changed, 30 insertions(+), 34 deletions(-) diff --git a/Mastodon/Scene/Profile/Header/ProfileHeaderViewController.swift b/Mastodon/Scene/Profile/Header/ProfileHeaderViewController.swift index 3112dd41e..0458ed9ae 100644 --- a/Mastodon/Scene/Profile/Header/ProfileHeaderViewController.swift +++ b/Mastodon/Scene/Profile/Header/ProfileHeaderViewController.swift @@ -336,41 +336,37 @@ extension ProfileHeaderViewController: ProfileHeaderViewDelegate { switch meter { case .post: // do nothing - break - case .follower: -#warning("TODO: Implement") -// guard let domain = viewModel.account.domain, -// let userID = viewModel.account.id -// else { return } -// let followerListViewModel = FollowerListViewModel( -// context: context, -// authContext: viewModel.authContext, -// domain: domain, -// userID: userID -// ) -// _ = coordinator.present( -// scene: .follower(viewModel: followerListViewModel), -// from: self, -// transition: .show -// ) - break - case .following: -#warning("TODO: Implement") -// guard let domain = viewModel.account.domain, -// let userID = viewModel.account.id -// else { return } -// let followingListViewModel = FollowingListViewModel( -// context: context, -// authContext: viewModel.authContext, -// domain: domain, -// userID: userID -// ) -// _ = coordinator.present( -// scene: .following(viewModel: followingListViewModel), -// from: self, -// transition: .show -// ) break + case .follower: + guard let domain = viewModel.account.domain else { return } + let userID = viewModel.account.id + let followerListViewModel = FollowerListViewModel( + context: context, + authContext: viewModel.authContext, + domain: domain, + userID: userID + ) + _ = coordinator.present( + scene: .follower(viewModel: followerListViewModel), + from: self, + transition: .show + ) + + case .following: + guard let domain = viewModel.account.domain else { return } + + let userID = viewModel.account.id + let followingListViewModel = FollowingListViewModel( + context: context, + authContext: viewModel.authContext, + domain: domain, + userID: userID + ) + _ = coordinator.present( + scene: .following(viewModel: followingListViewModel), + from: self, + transition: .show + ) } }