web: allow duplicate messages

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-09-09 20:09:31 +02:00
parent 2862b4ecfb
commit b923d85f6a
1 changed files with 1 additions and 5 deletions

View File

@ -49,13 +49,9 @@ export class MessageContainer extends LitElement {
}) as EventListener);
}
// add a new message, but only if the message isn't currently shown.
addMessage(message: APIMessage): void {
const matchingMessages = this.messages.filter((m) => m.message == message.message);
if (matchingMessages.length < 1) {
this.messages.push(message);
}
}
render(): TemplateResult {
return html`<ul class="pf-c-alert-group pf-m-toast">