remove previous items
This commit is contained in:
parent
d19b46d3e9
commit
a57f07c22b
@ -46,6 +46,7 @@ open class MoleculeStackView: Stack<StackModel> {
|
||||
open override func setStackItemsFromModel(_ model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
// If the items in the stack are different, clear them, create new ones.
|
||||
if (previousModel == nil) || Self.nameForReuse(with: previousModel!, delegateObject) != Self.nameForReuse(with: model, delegateObject) {
|
||||
removeAllItemViews()
|
||||
stackItems = []
|
||||
createStackItemsFromModel(model, delegateObject, additionalData)
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user