mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-29 04:15:00 +00:00
fix(essentials): #865 Adds SelectedContactMethodCount join to report the number of methods for the selected contact
This commit is contained in:
@@ -1204,6 +1204,20 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Analog
|
||||
});
|
||||
|
||||
[JoinName("SelectedContactMethodCount")]
|
||||
public JoinDataComplete SelectedContactMethodCount = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 102,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Reports the number of contact methods for the selected contact",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Analog
|
||||
});
|
||||
|
||||
[JoinName("CameraPresetSelect")]
|
||||
public JoinDataComplete CameraPresetSelect = new JoinDataComplete(
|
||||
new JoinData
|
||||
|
||||
@@ -972,6 +972,7 @@ ScreenIndexIsPinnedTo: {8} (a{17})
|
||||
if (entry is DirectoryFolder)
|
||||
{
|
||||
codec.GetDirectoryFolderContents(entry.FolderId);
|
||||
trilist.SetUshort(joinMap.SelectedContactMethodCount.JoinNumber, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -998,10 +999,16 @@ ScreenIndexIsPinnedTo: {8} (a{17})
|
||||
// If auto dial is disabled...
|
||||
var entryToDial = entry as DirectoryContact;
|
||||
|
||||
if (entryToDial == null) return;
|
||||
if (entryToDial == null)
|
||||
{
|
||||
trilist.SetUshort(joinMap.SelectedContactMethodCount.JoinNumber, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
trilist.SetSigFalseAction(joinMap.DirectoryDialSelectedLine.JoinNumber, () => Dial(entryToDial.ContactMethods[0].Number));
|
||||
|
||||
trilist.SetUshort(joinMap.SelectedContactMethodCount.JoinNumber, (ushort)entryToDial.ContactMethods.Count);
|
||||
|
||||
var clearBytes = XSigHelpers.ClearOutputs();
|
||||
|
||||
trilist.SetString(joinMap.ContactMethods.JoinNumber,
|
||||
|
||||
Reference in New Issue
Block a user