Changed how the built-in extensions work and fixed tab loading

This commit is contained in:
AlastorFox committed 2026-10-01 22:36:17 +03:00
1 parent 79c1d88b58
commit 4d916207a4
3 files changed
+90 -12

No files matched your search

+6
View File
@@ -38,6 +38,7 @@ public sealed class Session
public static class SessionStore
{
private static readonly string SessionPath = Path.Combine(AppContext.BaseDirectory, "session.json");
private static readonly SemaphoreSlim SaveGate = new(1, 1);
private static readonly JsonSerializerOptions JsonOptions = new()
{
@@ -47,6 +48,7 @@ public static class SessionStore
public static async Task SaveAsync(IEnumerable<BrowserTab> tabs, int activeIndex)
{
await SaveGate.WaitAsync();
try
{
var snapshots = tabs.Select(t => new TabSnapshot
@@ -83,6 +85,10 @@ public static class SessionStore
{
System.Diagnostics.Debug.WriteLine($"[SessionStore] Save failed: {ex.Message}");
}
finally
{
SaveGate.Release();
}
}
public static async Task<Session?> LoadAsync()