restore PageBehaviorHandlerProtocol createBehaviors

This commit is contained in:
Kyle Matthew Hedden 2022-07-13 23:22:44 -04:00
parent 664d90a713
commit 9cefb94bff
2 changed files with 4 additions and 5 deletions

View File

@ -31,7 +31,6 @@ import Foundation
public var tabBarHidden: Bool = false
public var tabBarIndex: Int?
// By default we mask until the server unlocks the page.
public var shouldMaskScreenWhileRecording: Bool?
//--------------------------------------------------

View File

@ -13,9 +13,10 @@ public protocol PageBehaviorHandlerProtocol {
public extension PageBehaviorHandlerProtocol {
/// Creates the behaviors and sets the variable.
func createBehaviors(for model: PageBehaviorHandlerModelProtocol, delegateObject: MVMCoreUIDelegateObject?) -> [PageBehaviorProtocol] {
mutating func createBehaviors(for model: PageBehaviorHandlerModelProtocol, delegateObject: MVMCoreUIDelegateObject?) {
guard let behaviorModels = model.behaviors else {
return []
behaviors = nil
return
}
var behaviors: [PageBehaviorProtocol] = []
@ -31,8 +32,7 @@ public extension PageBehaviorHandlerProtocol {
}
}
}
return behaviors
self.behaviors = behaviors.count > 0 ? behaviors : nil
}
/// Executes all behaviors of type.