#588 Updates how EssentialsHuddleVtc1Room sets SourceListKey

This commit is contained in:
Neil Dorin
2021-02-08 16:11:04 -07:00
parent 2987f600bb
commit 29d5ecb13f

View File

@@ -51,20 +51,6 @@ namespace PepperDash.Essentials
//************************ //************************
public override string SourceListKey
{
get
{
return _SourceListKey;
}
set
{
_SourceListKey = value;
SetCodecExternalSources();
}
}
protected override Func<bool> OnFeedbackFunc protected override Func<bool> OnFeedbackFunc
{ {
get get
@@ -338,7 +324,8 @@ namespace PepperDash.Essentials
CallTypeFeedback = new IntFeedback(() => 0); CallTypeFeedback = new IntFeedback(() => 0);
SourceListKey = "default"; SetSourceListKey();
EnablePowerOnToLastSource = true; EnablePowerOnToLastSource = true;
} }
catch (Exception e) catch (Exception e)
@@ -347,6 +334,21 @@ namespace PepperDash.Essentials
} }
} }
private void SetSourceListKey()
{
if (!string.IsNullOrEmpty(PropertiesConfig.SourceListKey))
{
SetSourceListKey(PropertiesConfig.SourceListKey);
}
else
{
SetSourceListKey(Key);
}
SetCodecExternalSources();
}
protected override void CustomSetConfig(DeviceConfig config) protected override void CustomSetConfig(DeviceConfig config)
{ {
var newPropertiesConfig = JsonConvert.DeserializeObject<EssentialsHuddleVtc1PropertiesConfig>(config.Properties.ToString()); var newPropertiesConfig = JsonConvert.DeserializeObject<EssentialsHuddleVtc1PropertiesConfig>(config.Properties.ToString());
@@ -377,6 +379,8 @@ namespace PepperDash.Essentials
return base.CustomActivate(); return base.CustomActivate();
} }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>