client: gateway retry, session remove

This commit is contained in:
Rory&
2026-09-04 12:35:33 +02:00
parent aac3caf8a2
commit 90839fbb40
4 changed files with 122 additions and 27 deletions
@@ -33,6 +33,17 @@ public class SessionStore(ILogger<SessionStore> logger, LocalStorageService loca
public async Task SetCurrentSessionAsync(Guid sessionId) {
await localStorage.SetItemAsJsonAsync(CurrentSessionKey, sessionId);
}
public async Task RemoveSessionAsync(Guid sessionId)
{
var sessions = await GetAllSessionsAsync();
sessions.Remove(sessionId);
await localStorage.SetItemAsJsonAsync(AllSessionsKey, sessions);
if (await localStorage.ContainsKeyAsync(CurrentSessionKey))
if (await localStorage.GetItemFromJsonAsync<Guid>(CurrentSessionKey) == sessionId)
await localStorage.RemoveItemAsync(CurrentSessionKey);
}
}
public class SessionEntry {