From 27cdc44532a89cca300943d437a424b08c8c4729 Mon Sep 17 00:00:00 2001 From: CMK Date: Fri, 9 Jul 2021 13:17:25 +0800 Subject: [PATCH] fix: home timeline initial setup may get wrong content offset issue --- .../HomeTimeline/HomeTimelineViewModel+Diffable.swift | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Mastodon/Scene/HomeTimeline/HomeTimelineViewModel+Diffable.swift b/Mastodon/Scene/HomeTimeline/HomeTimelineViewModel+Diffable.swift index d83a8bfb8..48f417449 100644 --- a/Mastodon/Scene/HomeTimeline/HomeTimelineViewModel+Diffable.swift +++ b/Mastodon/Scene/HomeTimeline/HomeTimelineViewModel+Diffable.swift @@ -32,14 +32,11 @@ extension HomeTimelineViewModel { timelineMiddleLoaderTableViewCellDelegate: timelineMiddleLoaderTableViewCellDelegate, threadReplyLoaderTableViewCellDelegate: nil ) - + + // make initial snapshot animation smooth var snapshot = NSDiffableDataSourceSnapshot() snapshot.appendSections([.main]) diffableDataSource?.apply(snapshot) - - // workaround to append loader wrong animation issue - snapshot.appendItems([.bottomLoader], toSection: .main) - diffableDataSource?.apply(snapshot) } }