fix(alerts): Test alert actually plays — it was queuing into nothing

TestAlert called Enqueue, which is the pure test seam: it fills the queue and returns. The
alert layer needs three more things to show anything — its scene list, the playback ticker
running, and the preview refreshed — and all three live in OnMessageReceived, the same entry
the chat feed uses (MainViewModel.Chat.cs).

Now it calls OnMessageReceived(message, Scenes), so the clip advances on the ticker and writes
frames to the box's VideoImageSource, which is what the preview pane displays.
This commit is contained in:
2026-11-01 14:07:14 -08:00
parent 005b459fe0
commit 46d12e5873
+5 -2
View File
@@ -129,7 +129,10 @@ public partial class MainViewModel : ViewModelBase
private void TestAlert()
{
_alertLayer.Enqueue(new Models.ChatMessage
// ⛔ OnMessageReceived, not Enqueue: Enqueue only fills the queue. The layer needs its scene
// list, its playback ticker started and its previews refreshed — that is what the chat path
// does (MainViewModel.Chat.cs), and it is why a bare Enqueue played nothing in the pane.
_alertLayer.OnMessageReceived(new Models.ChatMessage
{
AuthorName = "Test viewer",
Message = "Test alert — this is what a Super Chat looks like.",
@@ -140,7 +143,7 @@ public partial class MainViewModel : ViewModelBase
SuperChatCurrency = "$",
SuperChatDisplayString = "$5.00",
Kind = Models.ChatEventKind.SuperChat,
});
}, Scenes);
}
public ICommand OpenSettingsCommand { get; }