Skip to content

Commit

Permalink
fix: removed clearing layouts in enhanced layout mode
Browse files Browse the repository at this point in the history
- the event subscribption should keep the layouts up to date, there is no reason to clear them
  • Loading branch information
ngenovese11 committed Apr 4, 2024
1 parent 5e999a8 commit a5067fd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/CiscoRoomOsCodec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1739,6 +1739,7 @@ private void ProcessResponse(string response)
SendText("xStatus");
SendText("xStatus SIP");
SendText("xStatus Call");
CodecPollLayouts();
}
}
else if (data.Contains("xfeedback register /event/calldisconnect"))
Expand Down Expand Up @@ -1893,6 +1894,8 @@ private void UpdateCurrentLayout(JToken layout)

private void ClearLayouts()
{
if (EnhancedLayouts)
return;

var nullLayout = new CiscoCodecStatus.CurrentLayouts()
{
Expand All @@ -1909,8 +1912,6 @@ private void ClearLayouts()
LocalLayoutFeedback.FireUpdate();
OnAvailableLayoutsChanged(new List<CodecCommandWithLabel>());
OnCurrentLayoutChanged(String.Empty);


}

private void RegisterSystemUnitEvents()
Expand Down Expand Up @@ -2446,13 +2447,14 @@ private void ParseLayoutObject(CiscoCodecStatus.CurrentLayouts layoutObject)

private void ParseLayoutToken(JToken layoutToken)
{
Debug.Console(1, this, "Parsing Layout Token");
//if ((_presentationLocalOnly || _presentationSource == 0) && (_incomingPresentation == IncomingPresentationStatus.False)) return;
if (!_IsInPresentation)
{
ClearLayouts();
return;
// ClearLayouts();
// return;
}
Debug.Console(1, this, "Parsing Layout Token");

if (String.IsNullOrEmpty(layoutToken.ToString())) return;
UpdateCurrentLayout(layoutToken.SelectToken("ActiveLayout.Value"));
UpdateLayoutList(layoutToken.SelectToken("AvailableLayouts"));
Expand Down

0 comments on commit a5067fd

Please sign in to comment.