diff --git a/MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift b/MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift index f0bbcfda..c0cbc1dc 100644 --- a/MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift +++ b/MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift @@ -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)")