moved behaviour
This commit is contained in:
parent
f583a06725
commit
c8b382cc89
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user