moved behaviour

This commit is contained in:
Damodaram 2021-04-22 20:44:42 +05:30
parent f583a06725
commit c8b382cc89
2 changed files with 2 additions and 14 deletions

View File

@ -21,7 +21,7 @@ public class PageGetContactBehaviorModel: PageBehaviorModelProtocol {
public init() {}
}
public class PageGetContactBehavior: PageVisibilityBehavior,PageNextBatchActionBehavior {
public class PageGetContactBehavior: PageVisibilityBehavior {
var delegate: MVMCoreUIDelegateObject?
@ -45,7 +45,7 @@ public class PageGetContactBehavior: PageVisibilityBehavior,PageNextBatchActionB
}
}
func getContacts() {
public func getContacts() {
guard let rootMolecules = delegate?.moleculeDelegate?.getRootMolecules() else { return }
let store = CNContactStore()
let consumers: [PageGetContactBehaviorConsumerProtocol] = rootMolecules.allMoleculesOfType()
@ -57,10 +57,4 @@ public class PageGetContactBehavior: PageVisibilityBehavior,PageNextBatchActionB
}
public func onPageHidden(_ delegateObject: MVMCoreUIDelegateObject?) {}
public func nextBatchAction(_ delegateObject: MVMCoreUIDelegateObject?) {
if CNContactStore.authorizationStatus(for: .contacts) == .authorized {
getContacts()
}
}
}

View File

@ -39,12 +39,6 @@ public protocol PageLocalDataShareBehavior: PageBehaviorProtocol {
func receiveLocalPageData(_ data:[AnyHashable: Any], _ delegateObject: MVMCoreUIDelegateObject)
}
public protocol PageNextBatchActionBehavior: PageBehaviorProtocol {
func nextBatchAction(_ delegateObject: MVMCoreUIDelegateObject?)
}
public protocol PageCustomActionHandlerBehavior: PageBehaviorProtocol {
func handleAction(type actionType: String?, information: [AnyHashable : Any]?, additionalData: [AnyHashable : Any]?) -> Bool