updating review comments

This commit is contained in:
“subrra7” 2020-07-15 17:11:45 +05:30
parent 0dd1538d7c
commit da41081289

View File

@ -15,7 +15,7 @@ open class ModalMoleculeListTemplate: MoleculeListTemplate {
//--------------------------------------------------
public var closeButton: Button?
//--------------------------------------------------
// MARK: - Lifecycle
//--------------------------------------------------
@ -24,13 +24,14 @@ open class ModalMoleculeListTemplate: MoleculeListTemplate {
super.handleNewData()
closeButton = MVMCoreUICommonViewsUtility.addCloseButton(to: view, action: { [weak self] _ in
if let self = self {
guard let actionMap = self.loadObject?.pageJSON?.optionalDictionaryWithChainOfKeysOrIndexes([KeyButtonMap,"CloseButton"]) else {
MVMCoreNavigationHandler.shared()?.removeCurrentViewController()
return
}
MVMCoreActionHandler.shared()?.handleAction(with: actionMap, additionalData: nil, delegateObject: self.delegateObjectIVar)
guard let self = self else {
return
}
guard let actionMap = self.loadObject?.pageJSON?.optionalDictionaryWithChainOfKeysOrIndexes([KeyButtonMap,"CloseButton"]) else {
MVMCoreActionHandler.shared()?.handleAction(with: ActionBackModel().toJSON(), additionalData: nil, delegateObject: self.delegateObjectIVar)
return
}
MVMCoreActionHandler.shared()?.handleAction(with: actionMap, additionalData: nil, delegateObject: self.delegateObjectIVar)
})
}