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:
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user