mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-06 16:25:01 +00:00
Premerge call history
This commit is contained in:
@@ -58,6 +58,8 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
|
||||
SubpageReferenceList ActiveCallsSRL;
|
||||
|
||||
SmartObjectDynamicList RecentCallsList;
|
||||
|
||||
// These are likely temp until we get a keyboard built
|
||||
StringFeedback DialStringFeedback;
|
||||
StringBuilder DialStringBuilder = new StringBuilder();
|
||||
@@ -82,6 +84,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
SetupCallStagingPopover();
|
||||
SetupDialKeypad();
|
||||
ActiveCallsSRL = new SubpageReferenceList(TriList, UISmartObjectJoin.CodecActiveCallsHeaderList, 3, 3, 3);
|
||||
SetupRecentCallsList();
|
||||
|
||||
codec.CallStatusChange += new EventHandler<CodecCallStatusItemChangeEventArgs>(Codec_CallStatusChange);
|
||||
|
||||
@@ -333,6 +336,40 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
TriList.ID, UISmartObjectJoin.VCDialKeypad);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
void SetupRecentCallsList()
|
||||
{
|
||||
var codec = Codec as IHasCallHistory;
|
||||
if (codec != null)
|
||||
{
|
||||
// EVENT??????????????? Pointed at refresh
|
||||
RefreshRecentCallsList();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
void RefreshRecentCallsList()
|
||||
{
|
||||
var codec = Codec as IHasCallHistory;
|
||||
if (codec != null)
|
||||
{
|
||||
RecentCallsList = new SmartObjectDynamicList(TriList.SmartObjects[UISmartObjectJoin.VCRecentsList], true, 1200);
|
||||
ushort i = 0;
|
||||
foreach (var c in codec.CallHistory.RecentCalls)
|
||||
{
|
||||
i++;
|
||||
RecentCallsList.SetItemMainText(i, c.Name);
|
||||
var call = c; // for lambda scope
|
||||
RecentCallsList.SetItemButtonAction(i, b => { if(!b) Codec.Dial(call.Number); });
|
||||
}
|
||||
RecentCallsList.Count = i;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -404,7 +441,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
void ShowRecents()
|
||||
{
|
||||
//populate recents
|
||||
VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCDirectoryVisible);
|
||||
VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCRecentsVisible);
|
||||
StagingButtonFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingRecentsPress);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user