Digital PCT265 story MVAPCT-272: Minor code cleanups.
This commit is contained in:
parent
196a289226
commit
1a93309d9d
@ -20,7 +20,7 @@ public struct MoleculeInfo: Hashable, CustomDebugStringConvertible {
|
||||
}
|
||||
|
||||
public var moleculeId: String
|
||||
// TODO: This is an existing bug in the template handling. cellReuseId is a deep definition of the cell and its children. Structural changes to the cell should re-register.
|
||||
// cellReuseId is a deep definition of the cell and its children. Structural changes to the cell should re-register.
|
||||
public let cellReuseId: String
|
||||
public let cellType: MoleculeViewProtocol.Type
|
||||
|
||||
@ -335,7 +335,7 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
|
||||
}) != nil
|
||||
})
|
||||
|
||||
// A full reload can cause a flicker / animation. Better to avoid with above reconfigure method.
|
||||
// A full reload can cause a flicker / animation in the cell's nested view as its being rebuilt. Better to avoid with reconfigure method which will begin with the original cell state should the cell be on screen and visible.
|
||||
snapshot.reconfigureItems(updatedListItems)
|
||||
|
||||
dataSource.defaultRowAnimation = .fade
|
||||
@ -485,8 +485,6 @@ extension MoleculeListTemplate: MoleculeListProtocol {
|
||||
|
||||
public func swapMolecules(_ molecules: [ListItemModelProtocol & MoleculeModelProtocol], with replacements: [ListItemModelProtocol & MoleculeModelProtocol], position: AddMoleculesPosition, molecule: (ListItemModelProtocol & MoleculeModelProtocol)?, animation: UITableView.RowAnimation?) {
|
||||
|
||||
guard let tableView else { return }
|
||||
|
||||
var snapshot = dataSource.snapshot()
|
||||
|
||||
debugLog("[SWAP] State before: \(snapshot.itemIdentifiers)")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user