From a21bf23d441b4ce1e61e26ffee25c2254315709b Mon Sep 17 00:00:00 2001 From: Naresh Date: Wed, 28 Feb 2024 11:25:55 +0530 Subject: [PATCH] AddedLeftPanelAndRightPanelInBaseTemplateModel AddedLeftPanelAndRightPanelInBaseTemplateModel --- MVMCoreUI/Atomic/Templates/BaseTemplateModel.swift | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/MVMCoreUI/Atomic/Templates/BaseTemplateModel.swift b/MVMCoreUI/Atomic/Templates/BaseTemplateModel.swift index daa3aed1..5a84078e 100644 --- a/MVMCoreUI/Atomic/Templates/BaseTemplateModel.swift +++ b/MVMCoreUI/Atomic/Templates/BaseTemplateModel.swift @@ -32,7 +32,8 @@ import Foundation public var tabBarIndex: Int? public var shouldMaskScreenWhileRecording: Bool? - + public var hideLeftPanel: Bool = false + public var hideRightPanel: Bool = false //-------------------------------------------------- // MARK: - Initializer //-------------------------------------------------- @@ -56,6 +57,8 @@ import Foundation case tabBarHidden case tabBarIndex case shouldMaskScreenWhileRecording + case hideLeftPanel + case hideRightPanel } //-------------------------------------------------- @@ -79,6 +82,12 @@ import Foundation if let tabBarHidden = try typeContainer.decodeIfPresent(Bool.self, forKey: .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) shouldMaskScreenWhileRecording = try typeContainer.decodeIfPresent(Bool.self, forKey: .shouldMaskScreenWhileRecording) } @@ -92,6 +101,8 @@ import Foundation try container.encodeIfPresent(formRules, forKey: .formRules) try container.encodeModelIfPresent(navigationBar, forKey: .navigationBar) 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.encode(shouldMaskScreenWhileRecording, forKey: .shouldMaskScreenWhileRecording) }