Merge branch 'mvm_core_ui/feature/ONEAPP-6149' into 'develop'

As Per Scott Comment Updated Key to hide chat icon as per legacy

### Summary
As Per Scott Comment Updated Key to hide chat icon as per legacy

### JIRA Ticket
https://onejira.verizon.com/browse/ONEAPP-6149
https://www.figma.com/file/J7OTvY0Fe7gUQMZk13WYtZ/Prepaid-to-Postpaid-MVA-Experience?type=design&node-id=424-131359&mode=design&t=UVfHNEkYgDZoWpgx-0

Co-authored-by: Naresh <naresh.cherukuri@verizon.com>

See merge request https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui/-/merge_requests/1058
This commit is contained in:
Hedden, Kyle Matthew 2024-03-01 13:36:52 +00:00
commit aa6e55e55d
3 changed files with 15 additions and 1 deletions

View File

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

View File

@ -32,6 +32,8 @@ import Foundation
public var tabBarIndex: Int? public var tabBarIndex: Int?
public var shouldMaskScreenWhileRecording: Bool? public var shouldMaskScreenWhileRecording: Bool?
public var hideLeftPanel: Bool?
public var hideRightPanel: Bool?
public func replaceChildMolecule(with molecule: MoleculeModelProtocol) throws -> Bool { public func replaceChildMolecule(with molecule: MoleculeModelProtocol) throws -> Bool {
return try replaceChildMolecule(at: &navigationBar, with: molecule) return try replaceChildMolecule(at: &navigationBar, with: molecule)
@ -60,6 +62,8 @@ import Foundation
case tabBarHidden case tabBarHidden
case tabBarIndex case tabBarIndex
case shouldMaskScreenWhileRecording case shouldMaskScreenWhileRecording
case hideLeftPanel
case hideRightPanel
} }
//-------------------------------------------------- //--------------------------------------------------
@ -83,6 +87,12 @@ import Foundation
if let tabBarHidden = try typeContainer.decodeIfPresent(Bool.self, forKey: .tabBarHidden) { if let tabBarHidden = try typeContainer.decodeIfPresent(Bool.self, forKey: .tabBarHidden) {
self.tabBarHidden = tabBarHidden self.tabBarHidden = tabBarHidden
} }
if let hideLeftPanel = try typeContainer.decodeIfPresent(Bool.self, forKey: .hideLeftPanel) {
self.hideLeftPanel = hideLeftPanel
}
if let hideRightPanel = try typeContainer.decodeIfPresent(Bool.self, forKey: .hideRightPanel) {
self.hideRightPanel = hideRightPanel
}
tabBarIndex = try typeContainer.decodeIfPresent(Int.self, forKey: .tabBarIndex) tabBarIndex = try typeContainer.decodeIfPresent(Int.self, forKey: .tabBarIndex)
shouldMaskScreenWhileRecording = try typeContainer.decodeIfPresent(Bool.self, forKey: .shouldMaskScreenWhileRecording) shouldMaskScreenWhileRecording = try typeContainer.decodeIfPresent(Bool.self, forKey: .shouldMaskScreenWhileRecording)
} }
@ -96,6 +106,8 @@ import Foundation
try container.encodeIfPresent(formRules, forKey: .formRules) try container.encodeIfPresent(formRules, forKey: .formRules)
try container.encodeModelIfPresent(navigationBar, forKey: .navigationBar) try container.encodeModelIfPresent(navigationBar, forKey: .navigationBar)
try container.encode(tabBarHidden, forKey: .tabBarHidden) try container.encode(tabBarHidden, forKey: .tabBarHidden)
try container.encode(hideLeftPanel, forKey: .hideLeftPanel)
try container.encode(hideRightPanel, forKey: .hideRightPanel)
try container.encodeIfPresent(tabBarIndex, forKey: .tabBarIndex) try container.encodeIfPresent(tabBarIndex, forKey: .tabBarIndex)
try container.encode(shouldMaskScreenWhileRecording, forKey: .shouldMaskScreenWhileRecording) try container.encode(shouldMaskScreenWhileRecording, forKey: .shouldMaskScreenWhileRecording)
} }

View File

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