diff --git a/DeepDrftPublic.Client/Layout/DeepDrftMenu.razor b/DeepDrftPublic.Client/Layout/DeepDrftMenu.razor
index 985c553..b2fabcf 100644
--- a/DeepDrftPublic.Client/Layout/DeepDrftMenu.razor
+++ b/DeepDrftPublic.Client/Layout/DeepDrftMenu.razor
@@ -21,7 +21,7 @@
disabled="@_streamLoading"
aria-busy="@_streamLoading.ToString().ToLowerInvariant()"
@onclick="StreamNow">
- @if (_streamLoading)
+ @if (_findingTrack)
{
Finding a track…
}
@@ -83,7 +83,7 @@
disabled="@_streamLoading"
aria-busy="@_streamLoading.ToString().ToLowerInvariant()"
@onclick="StreamNowMobile">
- @if (_streamLoading)
+ @if (_findingTrack)
{
Finding a track…
}
@@ -118,6 +118,7 @@
private bool _mobileMenuOpen;
private bool _streamLoading;
+ private bool _findingTrack;
private string? _streamMessage;
private CancellationTokenSource? _messageCts;
@@ -135,6 +136,7 @@
if (_streamLoading) return;
_streamLoading = true;
+ _findingTrack = true;
_streamMessage = null;
// Warm the AudioContext FIRST, inside the gesture's call stack and before the network
@@ -164,6 +166,12 @@
if (closeMobileMenu)
_mobileMenuOpen = false;
+ // Track is found — flip only the label flag so the button reverts to
+ // "Stream Now ▶" before the stream begins, while _streamLoading stays true
+ // to keep the button disabled and the re-entrancy guard intact.
+ _findingTrack = false;
+ StateHasChanged();
+
if (PlayerService is not null)
await PlayerService.SelectTrackStreaming(track);
}
@@ -174,6 +182,7 @@
finally
{
_streamLoading = false;
+ _findingTrack = false;
}
}