Merge branch 'feature/isaac_screen' into 'develop'
isaac screen dashboard See merge request BPHV_MIPS/mvm_core_ui!298
This commit is contained in:
commit
164546ef23
@ -81,7 +81,7 @@ public typealias CoreObjectActionLoadPresentDelegate = MVMCoreActionDelegateProt
|
|||||||
return NSRange(location: 0, length: frontText?.count ?? 0)
|
return NSRange(location: 0, length: frontText?.count ?? 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
private var actionRange: NSRange {
|
public var actionRange: NSRange {
|
||||||
return NSRange(location: frontText?.count ?? 0, length: actionText?.count ?? 0)
|
return NSRange(location: frontText?.count ?? 0, length: actionText?.count ?? 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,14 +8,22 @@
|
|||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
@objcMembers public class LeftRightLabelModel: MoleculeModelProtocol {
|
@objcMembers open class LeftRightLabelModel: MoleculeModelProtocol {
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Properties
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
public static var identifier: String = "leftRightLabelView"
|
public static var identifier: String = "leftRightLabelView"
|
||||||
public var moleculeName: String? = LeftRightLabelModel.identifier
|
public var moleculeName: String? = LeftRightLabelModel.identifier
|
||||||
public var backgroundColor: Color?
|
public var backgroundColor: Color?
|
||||||
public var leftText: LabelModel
|
public var leftText: LabelModel
|
||||||
public var rightText: LabelModel?
|
public var rightText: LabelModel?
|
||||||
|
|
||||||
init(_ leftText: LabelModel) {
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(_ leftText: LabelModel) {
|
||||||
self.leftText = leftText
|
self.leftText = leftText
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -120,7 +120,7 @@ import UIKit
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - MFViewProtocol
|
// MARK: - MFViewProtocol
|
||||||
public func updateView(_ size: CGFloat) {
|
open func updateView(_ size: CGFloat) {
|
||||||
containerHelper.updateViewMargins(self, model: listItemModel, size: size)
|
containerHelper.updateViewMargins(self, model: listItemModel, size: size)
|
||||||
|
|
||||||
if accessoryView != nil {
|
if accessoryView != nil {
|
||||||
@ -151,7 +151,7 @@ import UIKit
|
|||||||
}
|
}
|
||||||
|
|
||||||
//TODO: ModelProtocol, Change to model
|
//TODO: ModelProtocol, Change to model
|
||||||
public func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
open func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
guard let model = model as? ListItemModelProtocol else { return }
|
guard let model = model as? ListItemModelProtocol else { return }
|
||||||
|
|
||||||
self.listItemModel = model
|
self.listItemModel = model
|
||||||
@ -176,6 +176,9 @@ import UIKit
|
|||||||
let backgroundColor = moleculeModel.backgroundColor {
|
let backgroundColor = moleculeModel.backgroundColor {
|
||||||
self.backgroundColor = backgroundColor.uiColor
|
self.backgroundColor = backgroundColor.uiColor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// align if needed.
|
||||||
|
containerHelper.set(with: model, for: molecule as? MVMCoreUIViewConstrainingProtocol)
|
||||||
}
|
}
|
||||||
|
|
||||||
open func reset() {
|
open func reset() {
|
||||||
@ -183,11 +186,11 @@ import UIKit
|
|||||||
backgroundColor = .white
|
backgroundColor = .white
|
||||||
}
|
}
|
||||||
|
|
||||||
public class func nameForReuse(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
open class func nameForReuse(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
||||||
return model.moleculeName
|
return model.moleculeName
|
||||||
}
|
}
|
||||||
|
|
||||||
public class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
open class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -31,9 +31,10 @@ extension MFViewController: MoleculeDelegateProtocol {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc public func moleculeLayoutUpdated(_ molecule: UIView & MVMCoreUIMoleculeViewProtocol) { }
|
// These are required because swift will call the extension function otherwise.
|
||||||
|
@objc public func moleculeLayoutUpdated(_ molecule: UIView & MVMCoreUIMoleculeViewProtocol) {}
|
||||||
|
|
||||||
@objc public func addMolecules(_ molecules: [[AnyHashable: Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) { }
|
@objc public func addMolecules(_ molecules: [[AnyHashable: Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) {}
|
||||||
|
@objc public func addMolecules(_ molecules: [[AnyHashable : Any]], indexPath: IndexPath, animation: UITableView.RowAnimation) {}
|
||||||
@objc public func removeMolecules(_ molecules: [[AnyHashable: Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) { }
|
@objc public func removeMolecules(_ molecules: [[AnyHashable: Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) {}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,15 +23,15 @@ open class Container: View, ContainerProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MARK:- ContainerProtocol
|
// MARK:- ContainerProtocol
|
||||||
public func alignHorizontal(_ alignment: UIStackView.Alignment) {
|
open func alignHorizontal(_ alignment: UIStackView.Alignment) {
|
||||||
containerHelper.alignHorizontal(alignment)
|
containerHelper.alignHorizontal(alignment)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func alignVertical(_ alignment: UIStackView.Alignment) {
|
open func alignVertical(_ alignment: UIStackView.Alignment) {
|
||||||
containerHelper.alignVertical(alignment)
|
containerHelper.alignVertical(alignment)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func constrainView(_ view: UIView) {
|
open func constrainView(_ view: UIView) {
|
||||||
containerHelper.constrainView(view)
|
containerHelper.constrainView(view)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public class ContainerHelper: NSObject {
|
open class ContainerHelper: NSObject {
|
||||||
var leftConstraint: NSLayoutConstraint?
|
var leftConstraint: NSLayoutConstraint?
|
||||||
var topConstraint: NSLayoutConstraint?
|
var topConstraint: NSLayoutConstraint?
|
||||||
var bottomConstraint: NSLayoutConstraint?
|
var bottomConstraint: NSLayoutConstraint?
|
||||||
@ -28,7 +28,7 @@ public class ContainerHelper: NSObject {
|
|||||||
var bottomLowConstraint: NSLayoutConstraint?
|
var bottomLowConstraint: NSLayoutConstraint?
|
||||||
var rightLowConstraint: NSLayoutConstraint?
|
var rightLowConstraint: NSLayoutConstraint?
|
||||||
|
|
||||||
func constrainView(_ view: UIView) {
|
open func constrainView(_ view: UIView) {
|
||||||
guard let margins = view.superview?.layoutMarginsGuide else { return }
|
guard let margins = view.superview?.layoutMarginsGuide else { return }
|
||||||
leftConstraint = view.leftAnchor.constraint(equalTo: margins.leftAnchor)
|
leftConstraint = view.leftAnchor.constraint(equalTo: margins.leftAnchor)
|
||||||
leftConstraint?.isActive = true
|
leftConstraint?.isActive = true
|
||||||
@ -69,7 +69,7 @@ public class ContainerHelper: NSObject {
|
|||||||
setAccessibility(view)
|
setAccessibility(view)
|
||||||
}
|
}
|
||||||
|
|
||||||
func setAccessibility(_ view: UIView) {
|
open func setAccessibility(_ view: UIView) {
|
||||||
guard let superView = view.superview else { return }
|
guard let superView = view.superview else { return }
|
||||||
superView.isAccessibilityElement = false
|
superView.isAccessibilityElement = false
|
||||||
if let elements = view.accessibilityElements {
|
if let elements = view.accessibilityElements {
|
||||||
@ -79,7 +79,7 @@ public class ContainerHelper: NSObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func alignHorizontal(_ alignment: UIStackView.Alignment) {
|
open func alignHorizontal(_ alignment: UIStackView.Alignment) {
|
||||||
switch alignment {
|
switch alignment {
|
||||||
case .center:
|
case .center:
|
||||||
alignCenterHorizontalConstraint?.isActive = true
|
alignCenterHorizontalConstraint?.isActive = true
|
||||||
@ -109,7 +109,7 @@ public class ContainerHelper: NSObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func alignVertical(_ alignment: UIStackView.Alignment) {
|
open func alignVertical(_ alignment: UIStackView.Alignment) {
|
||||||
switch alignment {
|
switch alignment {
|
||||||
case .center:
|
case .center:
|
||||||
alignCenterVerticalConstraint?.isActive = true
|
alignCenterVerticalConstraint?.isActive = true
|
||||||
@ -139,7 +139,7 @@ public class ContainerHelper: NSObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static func getAlignment(for string: String) -> UIStackView.Alignment? {
|
public static func getAlignment(for string: String) -> UIStackView.Alignment? {
|
||||||
switch string {
|
switch string {
|
||||||
case "leading":
|
case "leading":
|
||||||
return .leading
|
return .leading
|
||||||
@ -154,7 +154,7 @@ public class ContainerHelper: NSObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static func getAlignmentString(for alignment: UIStackView.Alignment?) -> String? {
|
public static func getAlignmentString(for alignment: UIStackView.Alignment?) -> String? {
|
||||||
switch alignment {
|
switch alignment {
|
||||||
case .leading:
|
case .leading:
|
||||||
return "leading"
|
return "leading"
|
||||||
@ -169,11 +169,11 @@ public class ContainerHelper: NSObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateViewMargins(_ view: UIView, model: ContainerModelProtocol?, size: CGFloat) {
|
open func updateViewMargins(_ view: UIView, model: ContainerModelProtocol?, size: CGFloat) {
|
||||||
MFStyler.setMarginsFor(view, size: size, defaultHorizontal: model?.useHorizontalMargins ?? false, top: (model?.useVerticalMargins ?? false) ? (model?.topMarginPadding ?? 0) : 0, bottom: (model?.useVerticalMargins ?? false) ? (model?.bottomMarginPadding ?? 0) : 0)
|
MFStyler.setMarginsFor(view, size: size, defaultHorizontal: model?.useHorizontalMargins ?? false, top: (model?.useVerticalMargins ?? false) ? (model?.topMarginPadding ?? 0) : 0, bottom: (model?.useVerticalMargins ?? false) ? (model?.bottomMarginPadding ?? 0) : 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
func set(with model: ContainerModelProtocol, for contained: MVMCoreUIViewConstrainingProtocol?) {
|
open func set(with model: ContainerModelProtocol, for contained: MVMCoreUIViewConstrainingProtocol?) {
|
||||||
if let horizontalAlignment = model.horizontalAlignment ?? contained?.horizontalAlignment?() {
|
if let horizontalAlignment = model.horizontalAlignment ?? contained?.horizontalAlignment?() {
|
||||||
alignHorizontal(horizontalAlignment)
|
alignHorizontal(horizontalAlignment)
|
||||||
}
|
}
|
||||||
@ -182,7 +182,7 @@ public class ContainerHelper: NSObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func set(with JSON: [AnyHashable: Any]?, for contained: UIView) {
|
open func set(with JSON: [AnyHashable: Any]?, for contained: UIView) {
|
||||||
if let horizontalAlignmentString = JSON?.optionalStringForKey("horizontalAlignment"), let alignment = ContainerHelper.getAlignment(for: horizontalAlignmentString) ?? (contained as? MVMCoreUIViewConstrainingProtocol)?.horizontalAlignment?() {
|
if let horizontalAlignmentString = JSON?.optionalStringForKey("horizontalAlignment"), let alignment = ContainerHelper.getAlignment(for: horizontalAlignmentString) ?? (contained as? MVMCoreUIViewConstrainingProtocol)?.horizontalAlignment?() {
|
||||||
alignHorizontal(alignment)
|
alignHorizontal(alignment)
|
||||||
} else if let alignment = (contained as? MVMCoreUIViewConstrainingProtocol)?.horizontalAlignment?() {
|
} else if let alignment = (contained as? MVMCoreUIViewConstrainingProtocol)?.horizontalAlignment?() {
|
||||||
|
|||||||
@ -14,4 +14,9 @@ public struct ImageHeadlineBodyModel: MoleculeModelProtocol {
|
|||||||
public var backgroundColor: Color?
|
public var backgroundColor: Color?
|
||||||
public var image: ImageViewModel
|
public var image: ImageViewModel
|
||||||
public var headlineBody: HeadlineBodyModel
|
public var headlineBody: HeadlineBodyModel
|
||||||
|
|
||||||
|
public init(image: ImageViewModel, headlineBody: HeadlineBodyModel) {
|
||||||
|
self.image = image
|
||||||
|
self.headlineBody = headlineBody
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -109,7 +109,9 @@ import UIKit
|
|||||||
|
|
||||||
public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
super.set(with: model, delegateObject, additionalData)
|
super.set(with: model, delegateObject, additionalData)
|
||||||
|
|
||||||
guard let model = model as? TwoButtonViewModel else { return }
|
guard let model = model as? TwoButtonViewModel else { return }
|
||||||
|
|
||||||
if let secondaryModel = model.secondaryButton {
|
if let secondaryModel = model.secondaryButton {
|
||||||
showSecondaryButton()
|
showSecondaryButton()
|
||||||
secondaryButton.set(with: secondaryModel, delegateObject, additionalData)
|
secondaryButton.set(with: secondaryModel, delegateObject, additionalData)
|
||||||
|
|||||||
@ -14,18 +14,18 @@ import UIKit
|
|||||||
// MARK: - MVMCoreUIMoleculeViewProtocol
|
// MARK: - MVMCoreUIMoleculeViewProtocol
|
||||||
|
|
||||||
public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
super.set(with: model, delegateObject, additionalData)
|
|
||||||
|
|
||||||
guard let model = model as? MoleculeListItemModel else { return }
|
guard let castModel = model as? MoleculeListItemModel else {
|
||||||
|
super.set(with: model, delegateObject, additionalData)
|
||||||
if molecule != nil {
|
return
|
||||||
(molecule as? ModelMoleculeViewProtocol)?.set(with: model.molecule, delegateObject, additionalData)
|
|
||||||
|
|
||||||
} else if let moleculeView = MVMCoreUIMoleculeMappingObject.shared()?.createMolecule(model.molecule, delegateObject, false) {
|
|
||||||
addMolecule(moleculeView)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
containerHelper.set(with: model, for: molecule as? MVMCoreUIViewConstrainingProtocol)
|
if molecule != nil {
|
||||||
|
(molecule as? ModelMoleculeViewProtocol)?.set(with: castModel.molecule, delegateObject, additionalData)
|
||||||
|
} else if let moleculeView = MVMCoreUIMoleculeMappingObject.shared()?.createMolecule(castModel.molecule, delegateObject, false) {
|
||||||
|
addMolecule(moleculeView)
|
||||||
|
}
|
||||||
|
super.set(with: model, delegateObject, additionalData)
|
||||||
}
|
}
|
||||||
|
|
||||||
public override class func nameForReuse(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
public override class func nameForReuse(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
@objcMembers public class HeadlineBodyModel: MoleculeModelProtocol {
|
@objcMembers open class HeadlineBodyModel: MoleculeModelProtocol {
|
||||||
public static var identifier: String = "headlineBody"
|
public static var identifier: String = "headlineBody"
|
||||||
public var moleculeName: String? = HeadlineBodyModel.identifier
|
public var moleculeName: String? = HeadlineBodyModel.identifier
|
||||||
public var headline: LabelModel?
|
public var headline: LabelModel?
|
||||||
@ -19,4 +19,8 @@ import Foundation
|
|||||||
public init(headline: LabelModel) {
|
public init(headline: LabelModel) {
|
||||||
self.headline = headline
|
self.headline = headline
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public init(body: LabelModel) {
|
||||||
|
self.body = body
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,6 +20,8 @@ public protocol MoleculeDelegateProtocol {
|
|||||||
/// Asks the delegate to add or remove molecules.
|
/// Asks the delegate to add or remove molecules.
|
||||||
//optional
|
//optional
|
||||||
func addMolecules(_ molecules: [[AnyHashable : Any]], sender: UITableViewCell, animation: UITableView.RowAnimation)
|
func addMolecules(_ molecules: [[AnyHashable : Any]], sender: UITableViewCell, animation: UITableView.RowAnimation)
|
||||||
|
func addMolecules(_ molecules: [[AnyHashable : Any]], indexPath: IndexPath, animation: UITableView.RowAnimation)
|
||||||
|
|
||||||
func removeMolecules(_ molecules: [[AnyHashable : Any]], sender: UITableViewCell, animation: UITableView.RowAnimation)
|
func removeMolecules(_ molecules: [[AnyHashable : Any]], sender: UITableViewCell, animation: UITableView.RowAnimation)
|
||||||
|
|
||||||
//optional
|
//optional
|
||||||
@ -36,6 +38,10 @@ extension MoleculeDelegateProtocol {
|
|||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public func addMolecules(_ molecules: [[AnyHashable : Any]], indexPath: IndexPath, animation: UITableView.RowAnimation) {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
public func removeMolecules(_ molecules: [[AnyHashable : Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) {
|
public func removeMolecules(_ molecules: [[AnyHashable : Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|||||||
@ -178,8 +178,7 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func addMolecules(_ molecules: [[AnyHashable: Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) {
|
open override func addMolecules(_ molecules: [[AnyHashable : Any]], indexPath: IndexPath, animation: UITableView.RowAnimation) {
|
||||||
|
|
||||||
var tmpMolecules = [ListItemModelProtocol & MoleculeModelProtocol]()
|
var tmpMolecules = [ListItemModelProtocol & MoleculeModelProtocol]()
|
||||||
|
|
||||||
molecules.forEach { molecule in
|
molecules.forEach { molecule in
|
||||||
@ -189,7 +188,6 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
|
|||||||
}
|
}
|
||||||
|
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
guard let indexPath = self.tableView?.indexPath(for: sender) else { return }
|
|
||||||
var indexPaths: [IndexPath] = []
|
var indexPaths: [IndexPath] = []
|
||||||
|
|
||||||
for molecule in tmpMolecules {
|
for molecule in tmpMolecules {
|
||||||
@ -207,7 +205,17 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func removeMolecules(_ molecules: [[AnyHashable: Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) {
|
open override func addMolecules(_ molecules: [[AnyHashable: Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) {
|
||||||
|
|
||||||
|
DispatchQueue.main.async { [weak self] in
|
||||||
|
guard let indexPath = self?.tableView?.indexPath(for: sender) else { return }
|
||||||
|
DispatchQueue.global().async {
|
||||||
|
self?.addMolecules(molecules, indexPath: indexPath, animation: animation)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open override func removeMolecules(_ molecules: [[AnyHashable: Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) {
|
||||||
|
|
||||||
var tmpMolecules = [ListItemModelProtocol & MoleculeModelProtocol]()
|
var tmpMolecules = [ListItemModelProtocol & MoleculeModelProtocol]()
|
||||||
|
|
||||||
@ -235,7 +243,7 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
|
|||||||
view.layoutIfNeeded()
|
view.layoutIfNeeded()
|
||||||
}
|
}
|
||||||
|
|
||||||
public func addMolecules(_ molecules: [ListItemModelProtocol & MoleculeModelProtocol], sender: UITableViewCell, animation: UITableView.RowAnimation) {
|
open func addMolecules(_ molecules: [ListItemModelProtocol & MoleculeModelProtocol], sender: UITableViewCell, animation: UITableView.RowAnimation) {
|
||||||
|
|
||||||
// This dispatch is needed to fix a race condition that can occur if this function is called during the table setup.
|
// This dispatch is needed to fix a race condition that can occur if this function is called during the table setup.
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
@ -257,7 +265,7 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public func removeMolecules(_ molecules: [ListItemModelProtocol & MoleculeModelProtocol], sender: UITableViewCell, animation: UITableView.RowAnimation) {
|
open func removeMolecules(_ molecules: [ListItemModelProtocol & MoleculeModelProtocol], sender: UITableViewCell, animation: UITableView.RowAnimation) {
|
||||||
|
|
||||||
var indexPaths: [IndexPath] = []
|
var indexPaths: [IndexPath] = []
|
||||||
//TODO: cehck for molecule protocola eqality
|
//TODO: cehck for molecule protocola eqality
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user