Persist PostIt podcast device and title preferences
All checks were successful
Forgejo Release / release (push) Successful in 13m7s
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:
parent
4a5a3c8844
commit
ff1a016c91
7 changed files with 203 additions and 12 deletions
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue