mirror of
https://github.com/Stone-Red-Code/EchoHub.git
synced 2026-09-04 00:56:05 +02:00
refactor: streamline audio service stop logic in AudioPlayerDialog
This commit is contained in:
@@ -328,16 +328,10 @@ public sealed class AudioPlayerDialog
|
||||
closeButton.Accepting += (s, e) =>
|
||||
{
|
||||
e.Handled = true;
|
||||
Task.Run(async () =>
|
||||
{
|
||||
await audioService.StopAsync();
|
||||
app.Invoke(() =>
|
||||
{
|
||||
isDisposed = true;
|
||||
animationTimer?.Dispose();
|
||||
app.RequestStop();
|
||||
});
|
||||
});
|
||||
isDisposed = true;
|
||||
animationTimer?.Dispose();
|
||||
_ = audioService.StopAsync(); // fire-and-forget
|
||||
app.RequestStop();
|
||||
};
|
||||
|
||||
volDownButton.Accepting += (s, e) =>
|
||||
|
||||
Reference in New Issue
Block a user