From e2d7cd6cf9da39155e0b5dcaa43460da4f02d965 Mon Sep 17 00:00:00 2001 From: Nathan Mattes Date: Tue, 28 May 2024 22:44:33 +0200 Subject: [PATCH] Fix places I forgot to fix :see_no_evil: (IOS-272) --- .../Profile/Bookmark/BookmarkViewController.swift | 1 - .../Following/FollowingListViewController.swift | 13 +------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/Mastodon/Scene/Profile/Bookmark/BookmarkViewController.swift b/Mastodon/Scene/Profile/Bookmark/BookmarkViewController.swift index 64f8b3151..92b25a4df 100644 --- a/Mastodon/Scene/Profile/Bookmark/BookmarkViewController.swift +++ b/Mastodon/Scene/Profile/Bookmark/BookmarkViewController.swift @@ -127,7 +127,6 @@ extension BookmarkViewController: StatusTableViewControllerNavigateable { extension BookmarkViewController: UIScrollViewDelegate { func scrollViewDidScroll(_ scrollView: UIScrollView) { Self.scrollViewDidScrollToEnd(scrollView) { - print("See me loading \(Date())") viewModel.stateMachine.enter(BookmarkViewModel.State.Loading.self) } } diff --git a/Mastodon/Scene/Profile/Following/FollowingListViewController.swift b/Mastodon/Scene/Profile/Following/FollowingListViewController.swift index 8db8178e5..e175a8920 100644 --- a/Mastodon/Scene/Profile/Following/FollowingListViewController.swift +++ b/Mastodon/Scene/Profile/Following/FollowingListViewController.swift @@ -164,18 +164,7 @@ extension FollowingListViewController: DataSourceProvider { extension FollowingListViewController: UIScrollViewDelegate { func scrollViewDidScroll(_ scrollView: UIScrollView) { - - if scrollView.isDragging || scrollView.isTracking { return } - - let frame = scrollView.frame - let contentOffset = scrollView.contentOffset - let contentSize = scrollView.contentSize - - let visibleBottomY = contentOffset.y + frame.height - let offset = 2 * frame.height - let fetchThrottleOffsetY = contentSize.height - offset - - if visibleBottomY > fetchThrottleOffsetY { + Self.scrollViewDidScrollToEnd(scrollView) { viewModel.shouldFetch.send() } }