Debug logging, show/hide avatar

This commit is contained in:
Natsumi
2022-12-15 23:57:10 +13:00
parent fd632aeeea
commit 9ec7dbbe55
4 changed files with 197 additions and 47 deletions

View File

@@ -37,7 +37,6 @@ namespace VRCX
private Thread m_Thread;
private bool m_ResetLog;
private bool m_FirstRun = true;
private bool m_NullLogMsg;
private static DateTime tillDate = DateTime.Now;
// NOTE
@@ -129,10 +128,8 @@ namespace VRCX
// sort by creation time
Array.Sort(fileInfos, (a, b) => a.CreationTimeUtc.CompareTo(b.CreationTimeUtc));
var index = 0;
foreach (var fileInfo in fileInfos)
{
index++;
fileInfo.Refresh();
if (fileInfo.Exists == false)
{
@@ -154,17 +151,6 @@ namespace VRCX
m_LogContextMap.Add(fileInfo.Name, logContext);
}
if (!m_NullLogMsg && fileInfo.Length == 0 && index == fileInfos.Length)
{
// check if last file is empty
Console.WriteLine($"{fileInfo.Name}");
if (MainForm.Instance != null && MainForm.Instance.Browser != null)
{
MainForm.Instance.Browser.ExecuteScriptAsync("$app.showNullLogWarning()");
m_NullLogMsg = true;
}
}
if (logContext.Length == fileInfo.Length)
{
continue;