Code review comment to pipe polling action through the delegate (controller) first.
This commit is contained in:
parent
0f56803a5d
commit
7c9d257a52
@ -88,7 +88,11 @@ public class PollingBehavior: NSObject, PageVisibilityBehavior {
|
|||||||
pollTimer?.schedule(deadline: .now() + timeRemaining, repeating: interval)
|
pollTimer?.schedule(deadline: .now() + timeRemaining, repeating: interval)
|
||||||
pollTimer?.setEventHandler(qos:.utility) {
|
pollTimer?.setEventHandler(qos:.utility) {
|
||||||
Task {
|
Task {
|
||||||
try? await MVMCoreActionHandler.shared()?.handleAction(with: refreshAction, additionalData: nil, delegateObject: delegateObject)
|
if let delegateActionHandler = delegateObject?.actionDelegate as? ActionDelegateProtocol {
|
||||||
|
try? await delegateActionHandler.performAction(with: refreshAction, additionalData: nil, delegateObject: delegateObject)
|
||||||
|
} else {
|
||||||
|
try? await MVMCoreActionHandler.shared()?.handleAction(with: refreshAction, additionalData: nil, delegateObject: delegateObject)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pollTimer?.resume()
|
pollTimer?.resume()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user