add emoji support in CW, fix #220

This commit is contained in:
Nicolas Constant 2020-02-24 20:32:30 -05:00
parent 6ab3fc1bd8
commit 6a2ec8bd23
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
2 changed files with 2 additions and 2 deletions

View File

@ -92,7 +92,7 @@
<a href class="status__content-warning" *ngIf="isContentWarned" title="show content"
(click)="removeContentWarning()">
<span class="status__content-warning--title">sensitive content</span>
{{ contentWarningText }}
<span innerHTML="{{ contentWarningText }}"></span>
</a>
<app-databinded-text class="status__content" *ngIf="!isContentWarned" [text]="statusContent"
(accountSelected)="accountSelected($event)" (hashtagSelected)="hashtagSelected($event)"

View File

@ -97,7 +97,7 @@ export class StatusComponent implements OnInit {
private checkContentWarning(status: Status) {
if (status.sensitive || status.spoiler_text) {
this.isContentWarned = true;
this.contentWarningText = status.spoiler_text;
this.contentWarningText = this.emojiConverter.applyEmojis(this.displayedStatus.emojis, status.spoiler_text, EmojiTypeEnum.medium);
}
}