Fix cookie bug

This commit is contained in:
Natsumi
2025-03-03 17:02:56 +13:00
parent ea12d25cef
commit 747a7ca683
8 changed files with 180 additions and 147 deletions
-8
View File
@@ -36,14 +36,6 @@ namespace VRCX
MainForm.Instance.Browser.ShowDevTools();
}
/// <summary>
/// Deletes all cookies from the global cef cookie manager.
/// </summary>
public override void DeleteAllCookies()
{
Cef.GetGlobalCookieManager().DeleteCookies();
}
public override void SetVR(bool active, bool hmdOverlay, bool wristOverlay, bool menuButton, int overlayHand)
{
Program.VRCXVRInstance.SetActive(active, hmdOverlay, wristOverlay, menuButton, overlayHand);
-1
View File
@@ -8,7 +8,6 @@ namespace VRCX
{
// AppApi
public abstract void ShowDevTools();
public abstract void DeleteAllCookies();
public abstract void SetVR(bool active, bool hmdOverlay, bool wristOverlay, bool menuButton, int overlayHand);
public abstract void RefreshVR();
public abstract void RestartVR();
+22 -6
View File
@@ -226,9 +226,17 @@ namespace VRCX
if (File.Exists(filePath))
return null;
var success = await ImageCache.SaveImageToFile(url, filePath);
return success ? filePath : null;
try
{
await ImageCache.SaveImageToFile(url, filePath);
}
catch (Exception ex)
{
logger.Error(ex, "Failed to save print to file");
return null;
}
return filePath;
}
public async Task<string> SaveStickerToFile(string url, string ugcFolderPath, string monthFolder, string fileName)
@@ -239,9 +247,17 @@ namespace VRCX
if (File.Exists(filePath))
return null;
var success = await ImageCache.SaveImageToFile(url, filePath);
return success ? filePath : null;
try
{
await ImageCache.SaveImageToFile(url, filePath);
}
catch (Exception ex)
{
logger.Error(ex, "Failed to save print to file");
return null;
}
return filePath;
}
}
}
-4
View File
@@ -10,10 +10,6 @@ namespace VRCX
{
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
public override void DeleteAllCookies()
{
}
public override void ShowDevTools()
{
}