mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
fixed vc directory browsing to properly sync between MC and Essentials UIs
This commit is contained in:
parent
84ee743ff5
commit
52ac57c080
3 changed files with 49 additions and 24 deletions
|
|
@ -40,6 +40,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
||||||
if (dirCodec != null)
|
if (dirCodec != null)
|
||||||
{
|
{
|
||||||
dirCodec.DirectoryResultReturned += new EventHandler<DirectoryEventArgs>(dirCodec_DirectoryResultReturned);
|
dirCodec.DirectoryResultReturned += new EventHandler<DirectoryEventArgs>(dirCodec_DirectoryResultReturned);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var recCodec = codec as IHasCallHistory;
|
var recCodec = codec as IHasCallHistory;
|
||||||
|
|
@ -74,10 +75,28 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
void dirCodec_DirectoryResultReturned(object sender, DirectoryEventArgs e)
|
void dirCodec_DirectoryResultReturned(object sender, DirectoryEventArgs e)
|
||||||
{
|
{
|
||||||
PostStatusMessage(new
|
SendDirectory((Codec as IHasDirectory).CurrentDirectoryResult, e.DirectoryIsOnRoot);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Posts the current directory
|
||||||
|
/// </summary>
|
||||||
|
void SendDirectory(CodecDirectory directory, bool isRoot)
|
||||||
{
|
{
|
||||||
currentDirectory = e.Directory
|
var dirCodec = Codec as IHasDirectory;
|
||||||
});
|
|
||||||
|
if (dirCodec != null)
|
||||||
|
{
|
||||||
|
var directoryMessage = new
|
||||||
|
{
|
||||||
|
currentDirectory = new
|
||||||
|
{
|
||||||
|
directoryResults = directory.CurrentDirectoryResults,
|
||||||
|
isRootDirectory = isRoot
|
||||||
|
}
|
||||||
|
};
|
||||||
|
PostStatusMessage(directoryMessage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -130,6 +149,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
||||||
appServerController.AddAction(MessagePath + "/getDirectory", new Action(GetDirectoryRoot));
|
appServerController.AddAction(MessagePath + "/getDirectory", new Action(GetDirectoryRoot));
|
||||||
appServerController.AddAction(MessagePath + "/directoryById", new Action<string>(s => GetDirectory(s)));
|
appServerController.AddAction(MessagePath + "/directoryById", new Action<string>(s => GetDirectory(s)));
|
||||||
appServerController.AddAction(MessagePath + "/directorySearch", new Action<string>(s => DirectorySearch(s)));
|
appServerController.AddAction(MessagePath + "/directorySearch", new Action<string>(s => DirectorySearch(s)));
|
||||||
|
appServerController.AddAction(MessagePath + "/directoryBack", new Action(GetPreviousDirectory));
|
||||||
}
|
}
|
||||||
|
|
||||||
// History actions
|
// History actions
|
||||||
|
|
@ -228,10 +248,26 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PostStatusMessage(new
|
dirCodec.SetCurrentDirectoryToRoot();
|
||||||
|
|
||||||
|
//PostStatusMessage(new
|
||||||
|
//{
|
||||||
|
// currentDirectory = dirCodec.DirectoryRoot
|
||||||
|
//});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Requests the parent folder contents
|
||||||
|
/// </summary>
|
||||||
|
void GetPreviousDirectory()
|
||||||
{
|
{
|
||||||
currentDirectory = dirCodec.DirectoryRoot
|
var dirCodec = Codec as IHasDirectory;
|
||||||
});
|
if (dirCodec == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
dirCodec.GetDirectoryParentFolderContents();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -284,6 +320,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
||||||
},
|
},
|
||||||
showSelfViewByDefault = Codec.ShowSelfViewByDefault,
|
showSelfViewByDefault = Codec.ShowSelfViewByDefault,
|
||||||
hasDirectory = Codec is IHasDirectory,
|
hasDirectory = Codec is IHasDirectory,
|
||||||
|
hasDirectorySearch = true,
|
||||||
hasRecents = Codec is IHasCallHistory,
|
hasRecents = Codec is IHasCallHistory,
|
||||||
hasCameras = Codec is IHasCameraControl
|
hasCameras = Codec is IHasCameraControl
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -59,15 +59,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||||
|
|
||||||
SmartObjectDynamicList DirectoryList;
|
SmartObjectDynamicList DirectoryList;
|
||||||
|
|
||||||
//CodecDirectory CurrentDirectoryResult;
|
|
||||||
|
|
||||||
///// <summary>
|
|
||||||
///// Tracks the directory browse history when browsing beyond the root directory
|
|
||||||
///// </summary>
|
|
||||||
//List<CodecDirectory> DirectoryBrowseHistory;
|
|
||||||
|
|
||||||
bool NextDirectoryResultIsFolderContents;
|
|
||||||
|
|
||||||
BoolFeedback DirectoryBackButtonVisibleFeedback;
|
BoolFeedback DirectoryBackButtonVisibleFeedback;
|
||||||
|
|
||||||
// These are likely temp until we get a keyboard built
|
// These are likely temp until we get a keyboard built
|
||||||
|
|
@ -558,6 +549,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||||
{
|
{
|
||||||
(Codec as IHasDirectory).SetCurrentDirectoryToRoot();
|
(Codec as IHasDirectory).SetCurrentDirectoryToRoot();
|
||||||
|
|
||||||
|
#warning Deal with this recursive issue
|
||||||
SearchKeypadClear();
|
SearchKeypadClear();
|
||||||
|
|
||||||
RefreshDirectory();
|
RefreshDirectory();
|
||||||
|
|
@ -585,10 +577,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
void dir_DirectoryResultReturned(object sender, DirectoryEventArgs e)
|
void dir_DirectoryResultReturned(object sender, DirectoryEventArgs e)
|
||||||
{
|
{
|
||||||
if (NextDirectoryResultIsFolderContents)
|
|
||||||
{
|
|
||||||
NextDirectoryResultIsFolderContents = false;
|
|
||||||
}
|
|
||||||
RefreshDirectory();
|
RefreshDirectory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -600,7 +589,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||||
{
|
{
|
||||||
(Codec as IHasDirectory).GetDirectoryFolderContents(folder.FolderId);
|
(Codec as IHasDirectory).GetDirectoryFolderContents(folder.FolderId);
|
||||||
|
|
||||||
NextDirectoryResultIsFolderContents = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -614,7 +602,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||||
{
|
{
|
||||||
codec.GetDirectoryParentFolderContents();
|
codec.GetDirectoryParentFolderContents();
|
||||||
|
|
||||||
RefreshDirectory();
|
//RefreshDirectory();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit efa39eb6fd171fc53c163a8d348d5af47bc5ccf0
|
Subproject commit 3e7dbeb111513cfed55db5012375bec1de7239a1
|
||||||
Loading…
Add table
Add a link
Reference in a new issue