From 368de0aee06bcc3dcde3cc1f98fa5df25a0c8139 Mon Sep 17 00:00:00 2001 From: shannon Date: Fri, 22 Nov 2024 13:00:01 -0500 Subject: [PATCH] Refresh the home timeline when the following list changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This resolves the issue where following people from the “Find people to follow” prompt on first login did not refresh the home timeline view. Fixes iOS-329 --- Mastodon/Scene/HomeTimeline/HomeTimelineViewModel.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Mastodon/Scene/HomeTimeline/HomeTimelineViewModel.swift b/Mastodon/Scene/HomeTimeline/HomeTimelineViewModel.swift index 71d52770e..ee34f134a 100644 --- a/Mastodon/Scene/HomeTimeline/HomeTimelineViewModel.swift +++ b/Mastodon/Scene/HomeTimeline/HomeTimelineViewModel.swift @@ -100,6 +100,10 @@ final class HomeTimelineViewModel: NSObject { MastodonFeed.fromStatus($0, kind: .home) }) ?? [] + authenticationBox.inMemoryCache.$followingUserIds.sink { [weak self] _ in + self?.homeTimelineNeedRefresh.send() + }.store(in: &disposeBag) + homeTimelineNeedRefresh .sink { [weak self] _ in self?.loadLatestStateMachine.enter(LoadLatestState.Loading.self)