From 882851b98fc4c2cecc1d17454b4e436d93aab5fe Mon Sep 17 00:00:00 2001 From: Natsumi Date: Thu, 8 Jan 2026 02:18:23 +1300 Subject: [PATCH] Fixes --- Dotnet/AppApi/Cef/AppApiVrCef.cs | 2 +- Dotnet/Cef/MainForm.cs | 2 +- Dotnet/ScreenshotMetadata/ScreenshotHelper.cs | 6 +++--- src/app.css | 3 +-- src/views/Tools/dialogs/ScreenshotMetadataDialog.vue | 2 -- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Dotnet/AppApi/Cef/AppApiVrCef.cs b/Dotnet/AppApi/Cef/AppApiVrCef.cs index d56498d3..ef586d7e 100644 --- a/Dotnet/AppApi/Cef/AppApiVrCef.cs +++ b/Dotnet/AppApi/Cef/AppApiVrCef.cs @@ -21,7 +21,7 @@ namespace VRCX public override void VrInit() { if (MainForm.Instance?.Browser != null && !MainForm.Instance.Browser.IsLoading && MainForm.Instance.Browser.CanExecuteJavascriptInMainFrame) - MainForm.Instance.Browser.ExecuteScriptAsync("window?.$pinia?.vr.vrInit"); + MainForm.Instance.Browser.ExecuteScriptAsync("window?.$pinia?.vr.vrInit();"); } public override void ToggleSystemMonitor(bool enabled) diff --git a/Dotnet/Cef/MainForm.cs b/Dotnet/Cef/MainForm.cs index b2a3f950..cf198eec 100644 --- a/Dotnet/Cef/MainForm.cs +++ b/Dotnet/Cef/MainForm.cs @@ -89,7 +89,7 @@ namespace VRCX Browser.GotFocus += (_, _) => { if (Browser != null && !Browser.IsLoading && Browser.CanExecuteJavascriptInMainFrame) - Browser.ExecuteScriptAsync("window?.$pinia?.vrcStatus?.onBrowserFocus"); + Browser.ExecuteScriptAsync("window?.$pinia?.vrcStatus?.onBrowserFocus();"); }; JavascriptBindings.ApplyAppJavascriptBindings(Browser.JavascriptObjectRepository); diff --git a/Dotnet/ScreenshotMetadata/ScreenshotHelper.cs b/Dotnet/ScreenshotMetadata/ScreenshotHelper.cs index 06367fc2..26632d9a 100644 --- a/Dotnet/ScreenshotMetadata/ScreenshotHelper.cs +++ b/Dotnet/ScreenshotMetadata/ScreenshotHelper.cs @@ -1,10 +1,10 @@ #nullable enable using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; using System.Linq; using System.Numerics; -using System.Text; using System.Xml; using Newtonsoft.Json; using NLog; @@ -15,7 +15,7 @@ namespace VRCX { private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); private static readonly ScreenshotMetadataDatabase CacheDatabase = new(Path.Join(Program.AppDataDirectory, "metadataCache.db")); - private static readonly Dictionary MetadataCache = new(); + private static readonly ConcurrentDictionary MetadataCache = new(); public enum ScreenshotSearchType { @@ -36,7 +36,7 @@ namespace VRCX var metadataStr = CacheDatabase.GetMetadataById(id); var metadataObj = metadataStr == null ? null : JsonConvert.DeserializeObject(metadataStr); - MetadataCache.Add(filePath, metadataObj); + MetadataCache.TryAdd(filePath, metadataObj); metadata = metadataObj; return true; diff --git a/src/app.css b/src/app.css index 90c0f21f..699c04f8 100644 --- a/src/app.css +++ b/src/app.css @@ -463,8 +463,7 @@ html.dark .x-friend-item > .detail > .extra, } .el-select__wrapper { - height: var(--el-component-size); - padding: 0 12px; + padding: 4px 12px; } .el-table { diff --git a/src/views/Tools/dialogs/ScreenshotMetadataDialog.vue b/src/views/Tools/dialogs/ScreenshotMetadataDialog.vue index a1291aba..96f0df48 100644 --- a/src/views/Tools/dialogs/ScreenshotMetadataDialog.vue +++ b/src/views/Tools/dialogs/ScreenshotMetadataDialog.vue @@ -54,7 +54,6 @@