Make ngbtooltip happier and not remount

When we use detectChanges(), ngbTooltip gets annoyed at us and stops working correctly. This commit also cleans up some of the attributes on the sticker button.

Fixes https://github.com/turt2live/matrix-dimension/issues/276
This commit is contained in:
Travis Ralston 2019-04-17 22:58:18 -06:00
parent a3952a880c
commit 109bceb924
2 changed files with 3 additions and 2 deletions

View File

@ -25,7 +25,8 @@
<div class="stickers">
<div class="sticker" *ngFor="let sticker of pack.stickers trackById" (click)="sendSticker(sticker, pack)">
<img [src]="getThumbnailUrl(sticker.thumbnail.mxc, 48, 48)" width="48" height="48" class="image" ngbTooltip="{{ sticker.name }}" placement="bottom" />
<img [src]="getThumbnailUrl(sticker.thumbnail.mxc, 48, 48)" width="48" height="48" class="image"
[alt]="sticker.name" [ngbTooltip]="sticker.name" placement="bottom" />
</div>
</div>
</div>

View File

@ -127,7 +127,7 @@ export class StickerPickerWidgetWrapperComponent extends CapableWidget implement
this.packs = packs.filter(p => p.isSelected);
console.log("User has " + this.packs.length + "/" + packs.length + " sticker packs selected");
this.isLoading = false;
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
} catch (e) {
console.error(e);
}