web: allow duplicate messages
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
2862b4ecfb
commit
b923d85f6a
|
@ -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">
|
||||
|
|
Reference in New Issue