From 81314c15002e401e12a467ebf0d760ff82ea9c50 Mon Sep 17 00:00:00 2001 From: Mikhail Golovko Date: Mon, 1 Apr 2024 17:32:32 +0300 Subject: [PATCH] IOS-2478 Disable animation, delete unused method --- .../TextEditor/EditorPage/EditorPageController.swift | 12 +----------- .../TextEditor/EditorPage/EditorPageViewInput.swift | 1 - .../Models/EditorBlockCollectionController.swift | 4 ---- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/Anytype/Sources/PresentationLayer/TextEditor/EditorPage/EditorPageController.swift b/Anytype/Sources/PresentationLayer/TextEditor/EditorPage/EditorPageController.swift index c26fb8c1c0..f586ce776e 100644 --- a/Anytype/Sources/PresentationLayer/TextEditor/EditorPage/EditorPageController.swift +++ b/Anytype/Sources/PresentationLayer/TextEditor/EditorPage/EditorPageController.swift @@ -5,7 +5,7 @@ import AnytypeCore import SwiftUI enum EditorPageConfigurationConstants { - static let dataSourceAnimationEnabled = true + static let dataSourceAnimationEnabled = false } final class EditorPageController: UIViewController { @@ -320,16 +320,6 @@ extension EditorPageController: EditorPageViewInput { func textBlockWillBeginEditing() { } - func reload(items: [EditorItem]) { - guard items.count > 0 else { return } - - var snapshot = dataSource.snapshot() - - let existingItems = items.filter { snapshot.itemIdentifiers.contains($0) } - snapshot.reloadItems(existingItems) - dataSource.apply(snapshot, animatingDifferences: true) - } - func visibleRect(to view: UIView) -> CGRect { return collectionView.convert(collectionView.bounds, to: view) } diff --git a/Anytype/Sources/PresentationLayer/TextEditor/EditorPage/EditorPageViewInput.swift b/Anytype/Sources/PresentationLayer/TextEditor/EditorPage/EditorPageViewInput.swift index b012ba94ea..dd343b39ab 100644 --- a/Anytype/Sources/PresentationLayer/TextEditor/EditorPage/EditorPageViewInput.swift +++ b/Anytype/Sources/PresentationLayer/TextEditor/EditorPage/EditorPageViewInput.swift @@ -2,7 +2,6 @@ import Services import UIKit protocol EditorCollectionReloadable: AnyObject { - func reload(items: [EditorItem]) func reconfigure(items: [EditorItem]) func itemDidChangeFrame(item: EditorItem) func scrollToTopBlock(blockId: String) // Change to editorItem diff --git a/Anytype/Sources/PresentationLayer/TextEditor/EditorPage/Models/EditorBlockCollectionController.swift b/Anytype/Sources/PresentationLayer/TextEditor/EditorPage/Models/EditorBlockCollectionController.swift index 9af524a140..70cca813c2 100644 --- a/Anytype/Sources/PresentationLayer/TextEditor/EditorPage/Models/EditorBlockCollectionController.swift +++ b/Anytype/Sources/PresentationLayer/TextEditor/EditorPage/Models/EditorBlockCollectionController.swift @@ -8,10 +8,6 @@ final class EditorBlockCollectionController: EditorCollectionReloadable { self.viewInput = viewInput } - func reload(items: [EditorItem]) { - viewInput?.reload(items: items) - } - func reconfigure(items: [EditorItem]) { viewInput?.reconfigure(items: items) }