Persist PostIt podcast device and title preferences
All checks were successful
Forgejo Release / release (push) Successful in 13m7s

Remember detected capture devices, camera and microphone selections, and the default podcast title in user settings. Restore preferences on page creation and surface save failures.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Paul Schneider 2026-11-02 14:13:48 +00:00
commit ff1a016c91
Signed by: notazof
GPG key ID: AD4B9B545FBD7D12
7 changed files with 203 additions and 12 deletions

View file

@ -22,7 +22,7 @@ public sealed class PodcastBroadcasterTests
var factory = Platform.CreatePodcastCaptureAsync;
var store = new TokenStore(tokenPath);
store.Save(new RefreshTokenRecord("test-access-token", "test-refresh-token", DateTimeOffset.UtcNow.AddHours(1), null));
await using var api = new YavscApiClient(new Settings(), store);
await using var api = new YavscApiClient(new Settings(tokenPath + ".settings"), store);
await using var transport = new Transport();
FakeCapture? capture = null;
PodcastsPageViewModel? vm = null;
@ -72,6 +72,7 @@ public sealed class PodcastBroadcasterTests
Platform.RequestPodcastPermissionsAsync = permissions;
Platform.CreatePodcastCaptureAsync = factory;
File.Delete(tokenPath);
File.Delete(tokenPath + ".settings");
}
}, TestContext.Current.CancellationToken);
@ -84,7 +85,7 @@ public sealed class PodcastBroadcasterTests
var factory = Platform.CreatePodcastCaptureAsync;
var store = new TokenStore(tokenPath);
store.Save(new RefreshTokenRecord("test-access-token", "test-refresh-token", DateTimeOffset.UtcNow.AddHours(1), null));
await using var api = new YavscApiClient(new Settings(), store);
await using var api = new YavscApiClient(new Settings(tokenPath + ".settings"), store);
await using var transport = new Transport();
try
{
@ -119,6 +120,7 @@ public sealed class PodcastBroadcasterTests
Platform.RequestPodcastPermissionsAsync = permissions;
Platform.CreatePodcastCaptureAsync = factory;
File.Delete(tokenPath);
File.Delete(tokenPath + ".settings");
}
}