diff --git a/PepperDashEssentials/AppServer/Messengers/VideoCodecBaseMessenger.cs b/PepperDashEssentials/AppServer/Messengers/VideoCodecBaseMessenger.cs index bd44e139..1f3f42b6 100644 --- a/PepperDashEssentials/AppServer/Messengers/VideoCodecBaseMessenger.cs +++ b/PepperDashEssentials/AppServer/Messengers/VideoCodecBaseMessenger.cs @@ -122,10 +122,23 @@ namespace PepperDash.Essentials.AppServer.Messengers if (call != null) Codec.AcceptCall(call); })); - appServerController.AddAction(MessagePath + "/getDirectory", new Action(GetDirectoryRoot)); - appServerController.AddAction(MessagePath + "/directoryById", new Action(s => GetDirectory(s))); - appServerController.AddAction(MessagePath + "/directorySearch", new Action(s => DirectorySearch(s))); - appServerController.AddAction(MessagePath + "/getCallHistory", new Action(GetCallHistory)); + + // Directory actions + var dirCodec = Codec as IHasDirectory; + if (dirCodec != null) + { + appServerController.AddAction(MessagePath + "/getDirectory", new Action(GetDirectoryRoot)); + appServerController.AddAction(MessagePath + "/directoryById", new Action(s => GetDirectory(s))); + appServerController.AddAction(MessagePath + "/directorySearch", new Action(s => DirectorySearch(s))); + } + + // History actions + var recCodec = Codec as IHasCallHistory; + if (recCodec != null) + { + appServerController.AddAction(MessagePath + "/getCallHistory", new Action(GetCallHistory)); + } + appServerController.AddAction(MessagePath + "/privacyModeOn", new Action(Codec.PrivacyModeOn)); appServerController.AddAction(MessagePath + "/privacyModeOff", new Action(Codec.PrivacyModeOff)); appServerController.AddAction(MessagePath + "/privacyModeToggle", new Action(Codec.PrivacyModeToggle)); diff --git a/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs b/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs index 13bf6a85..998ccbd9 100644 --- a/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs +++ b/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs @@ -61,10 +61,10 @@ namespace PepperDash.Essentials.UIDrivers.VC CodecDirectory CurrentDirectoryResult; - /// - /// Tracks the directory browse history when browsing beyond the root directory - /// - List DirectoryBrowseHistory; + ///// + ///// Tracks the directory browse history when browsing beyond the root directory + ///// + //List DirectoryBrowseHistory; bool NextDirectoryResultIsFolderContents; @@ -532,8 +532,6 @@ namespace PepperDash.Essentials.UIDrivers.VC /// void SetupDirectoryList() { - DirectoryBrowseHistory = new List(); - var codec = Codec as IHasDirectory; if (codec != null) { @@ -558,12 +556,10 @@ namespace PepperDash.Essentials.UIDrivers.VC } /// - /// Sets the current directory resutls to the DirectorRoot and updates Back Button visibiltiy + /// Sets the current directory results to the DirectoryRoot and updates Back Button visibiltiy /// void SetCurrentDirectoryToRoot() { - DirectoryBrowseHistory.Clear(); - CurrentDirectoryResult = (Codec as IHasDirectory).DirectoryRoot; SearchKeypadClear(); @@ -600,7 +596,6 @@ namespace PepperDash.Essentials.UIDrivers.VC if (NextDirectoryResultIsFolderContents) { NextDirectoryResultIsFolderContents = false; - DirectoryBrowseHistory.Add(e.Directory); } CurrentDirectoryResult = e.Directory; DirectoryBackButtonVisibleFeedback.FireUpdate(); @@ -625,18 +620,13 @@ namespace PepperDash.Essentials.UIDrivers.VC { var codec = Codec as IHasDirectory; - if (DirectoryBrowseHistory.Count > 0) + if (codec != null) { - var lastItemIndex = DirectoryBrowseHistory.Count - 1; - CurrentDirectoryResult = DirectoryBrowseHistory[lastItemIndex]; - DirectoryBrowseHistory.Remove(DirectoryBrowseHistory[lastItemIndex]); + CurrentDirectoryResult = codec.GetDirectoryParentFolderContents(); RefreshDirectory(); } - else - { - SetCurrentDirectoryToRoot(); - } + } /// @@ -725,13 +715,13 @@ namespace PepperDash.Essentials.UIDrivers.VC Parent.MeetingOrContactMethodModalSrl.StringInputSig(i, 4).StringValue = ""; Parent.MeetingOrContactMethodModalSrl.StringInputSig(i, 5).StringValue = "Connect"; Parent.MeetingOrContactMethodModalSrl.BoolInputSig(i, 2).BoolValue = true; - var cc = c; // lambda scope + var cc = c; // to maintian lambda scope Parent.MeetingOrContactMethodModalSrl.GetBoolFeedbackSig(i, 1).SetSigFalseAction(() => { Parent.PopupInterlock.Hide(); var codec = Codec as VideoCodecBase; if (codec != null) - codec.Dial(c.Number); + codec.Dial(cc.Number); }); } Parent.MeetingOrContactMethodModalSrl.Count = i; diff --git a/essentials-framework b/essentials-framework index c40f3b40..d869bc92 160000 --- a/essentials-framework +++ b/essentials-framework @@ -1 +1 @@ -Subproject commit c40f3b40d57a82b9191d4f8f6dbf89a4756af4e4 +Subproject commit d869bc92ce177a79dcc3c3e3f385246fca7692d7