apparent merge conflict

This commit is contained in:
Kevin G Christiano 2020-03-25 17:21:58 -04:00
parent 7b857414af
commit 60199831a3

View File

@ -29,16 +29,21 @@ import UIKit
guard newValue != oldValue,
let self = self,
let index = self.dropDown.pickerData.firstIndex(of: newValue),
let model = self.listItemModel as? DropDownListItemModel,
let dropListItemJSON = (self.listItemModel as? DropDownListItemModel).toJSON(),
let json2d = dropListItemJSON.optionalArrayForKey("molecules") as? [[[AnyHashable: Any]]],
!json2d.isEmpty && !(json2d.first?.isEmpty ?? false)
else { return }
if self.previousIndex != NSNotFound {
self.delegateObject?.moleculeDelegate?.removeMolecules(json2d[self.previousIndex], sender: self, animation: .fade)
self.delegateObject?.moleculeDelegate?.removeMolecules(model.molecules[self.previousIndex], animation: .fade)
// self.delegateObject?.moleculeDelegate?.removeMolecules(json2d[self.previousIndex], animation: .fade)
}
self.delegateObject?.moleculeDelegate?.addMolecules(json2d[index], sender: self, animation: .fade)
if let indexPath = self.delegateObject?.moleculeDelegate?.getIndexPath(for: model) {
self.delegateObject?.moleculeDelegate?.addMolecules(model.molecules[index], indexPath: indexPath, animation: .fade)
// self.delegateObject?.moleculeDelegate?.addMolecules(json2d[index], animation: .fade)
}
self.previousIndex = index
}
}