Skip to content

Commit

Permalink
IOS-2478 Disable animation, delete unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
mgolovko committed Apr 1, 2024
1 parent c19c148 commit 81314c1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import AnytypeCore
import SwiftUI

enum EditorPageConfigurationConstants {
static let dataSourceAnimationEnabled = true
static let dataSourceAnimationEnabled = false
}

final class EditorPageController: UIViewController {
Expand Down Expand Up @@ -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)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 81314c1

Please sign in to comment.