From 1a0ab4607cf1f4ba7a572664ddc6bd4585f8bc21 Mon Sep 17 00:00:00 2001 From: Nathan Mattes Date: Tue, 23 May 2023 13:13:34 +0200 Subject: [PATCH] Refresh hometimeline (IOS-157) --- .../SuggestionAccount/SuggestionAccountViewController.swift | 1 + .../SuggestionAccount/SuggestionAccountViewModel.swift | 1 + .../FeedFetchedResultsController.swift | 6 ------ 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Mastodon/Scene/SuggestionAccount/SuggestionAccountViewController.swift b/Mastodon/Scene/SuggestionAccount/SuggestionAccountViewController.swift index fa83c2696..eddbe250c 100644 --- a/Mastodon/Scene/SuggestionAccount/SuggestionAccountViewController.swift +++ b/Mastodon/Scene/SuggestionAccount/SuggestionAccountViewController.swift @@ -77,6 +77,7 @@ class SuggestionAccountViewController: UIViewController, NeedsDependency { //MARK: - Actions @objc func doneButtonDidClick(_ sender: UIButton) { + viewModel.delegate?.homeTimelineNeedRefresh.send() dismiss(animated: true, completion: nil) } } diff --git a/Mastodon/Scene/SuggestionAccount/SuggestionAccountViewModel.swift b/Mastodon/Scene/SuggestionAccount/SuggestionAccountViewModel.swift index f75506f8a..a57d71df0 100644 --- a/Mastodon/Scene/SuggestionAccount/SuggestionAccountViewModel.swift +++ b/Mastodon/Scene/SuggestionAccount/SuggestionAccountViewModel.swift @@ -133,6 +133,7 @@ final class SuggestionAccountViewModel: NSObject { } }) + delegate?.homeTimelineNeedRefresh.send() completion?() } } diff --git a/MastodonSDK/Sources/MastodonCore/FetchedResultsController/FeedFetchedResultsController.swift b/MastodonSDK/Sources/MastodonCore/FetchedResultsController/FeedFetchedResultsController.swift index 27cc5a08d..2ba2ec5cb 100644 --- a/MastodonSDK/Sources/MastodonCore/FetchedResultsController/FeedFetchedResultsController.swift +++ b/MastodonSDK/Sources/MastodonCore/FetchedResultsController/FeedFetchedResultsController.swift @@ -83,11 +83,6 @@ final public class FeedFetchedResultsController: NSObject { } .store(in: &disposeBag) } - - deinit { - logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public)") - } - } // MARK: - NSFetchedResultsControllerDelegate @@ -96,7 +91,6 @@ extension FeedFetchedResultsController: NSFetchedResultsControllerDelegate { _ controller: NSFetchedResultsController, didChangeContentWith snapshot: NSDiffableDataSourceSnapshotReference ) { - os_log("%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) let snapshot = snapshot as NSDiffableDataSourceSnapshot self._objectIDs.send(snapshot.itemIdentifiers) }