fixed start page button flickering - fixes #4298

This commit is contained in:
Eugene Pankov 2021-08-02 09:25:05 +02:00
parent 920b2b85b3
commit 0df5fb4a34
No known key found for this signature in database
GPG key ID: 5896FCBBDD1CF4F4
2 changed files with 5 additions and 1 deletions

View file

@ -5,7 +5,7 @@ div
.list-group
a.list-group-item.list-group-item-action.d-flex(
*ngFor='let button of getButtons()',
*ngFor='let button of getButtons(); trackBy: buttonsTrackBy',
(click)='button.click()',
)
.d-flex.align-self-center([innerHTML]='sanitizeIcon(button.icon)')

View file

@ -32,4 +32,8 @@ export class StartPageComponent {
sanitizeIcon (icon?: string): any {
return this.domSanitizer.bypassSecurityTrustHtml(icon ?? '')
}
buttonsTrackBy (btn: ToolbarButton): any {
return btn.title + btn.icon
}
}