AddedeLeftAndRightPanelKeysToPageModel

AddedeLeftAndRightPanelKeysToPageModel
This commit is contained in:
Naresh 2024-02-29 22:36:52 +05:30
parent 99e3d43376
commit 335ca30c6f
5 changed files with 5 additions and 5 deletions

View File

@ -14,4 +14,6 @@ public protocol PageModelProtocol {
var backgroundColor: Color? { get set }
var navigationBar: (NavigationItemModelProtocol & MoleculeModelProtocol)? { get set }
var shouldMaskScreenWhileRecording: Bool? { get }
var hideLeftPanel: Bool? { get }
var hideRightPanel: Bool? { get }
}

View File

@ -32,8 +32,8 @@ import Foundation
public var tabBarIndex: Int?
public var shouldMaskScreenWhileRecording: Bool?
public var hideLeftPanel: Bool = false
public var hideRightPanel: Bool = false
public var hideLeftPanel: Bool?
public var hideRightPanel: Bool?
public func replaceChildMolecule(with molecule: MoleculeModelProtocol) throws -> Bool {
return try replaceChildMolecule(at: &navigationBar, with: molecule)

View File

@ -559,7 +559,7 @@ import MVMCore
public func isRightPanelAccessible() -> Bool {
// TODO: Remove when FAB is 100%.
if loadObject?.pageJSON?.boolForKey(KeyHideRightPanel) ?? false {
if let hideRightPanel = model?.hideRightPanel, hideRightPanel == true {
return false
}
return (MVMCoreUISession.sharedGlobal()?.launchAppLoadedSuccessfully ?? false) || showRightPanelForScreenBeforeLaunchApp()

View File

@ -26,7 +26,6 @@ extern NSString * const KeyEnabled;
extern NSString * const KeyFieldName;
extern NSString * const KeyHideMainMenu;
extern NSString * const KeyHideRightPanel;
extern NSString * const KeyProgressPercent;
extern NSString * const KeyPrimaryButton;

View File

@ -27,7 +27,6 @@ NSString * const KeyFieldKey = @"fieldKey";
NSString * const KeyRequired = @"required";
NSString * const KeyHideMainMenu = @"hideMainMenu";
NSString * const KeyHideRightPanel = @"hideRightPanel";
NSString * const KeyProgressPercent = @"progressPercent";
NSString * const KeyPrimaryButton = @"PrimaryButton";