Support textEntityTypeStrikethrough

It's not currently working because of this QtQuick bug:

  https://bugreports.qt.io/browse/QTBUG-72376

but maybe someday it will.
This commit is contained in:
Slava Monich 2022-02-20 18:54:52 +02:00
parent 0b350d083e
commit 11f055932a

View file

@ -302,6 +302,12 @@ function enhanceMessageText(formattedText, ignoreEntities) {
{ offset: (entity.offset + entity.length), insertionString: "</i>", removeLength: 0 }
);
break;
case "textEntityTypeStrikethrough":
messageInsertions.push(
{ offset: entity.offset, insertionString: "<s>", removeLength: 0 },
{ offset: (entity.offset + entity.length), insertionString: "</s>", removeLength: 0 }
);
break;
case "textEntityTypeMention":
messageInsertions.push(
{ offset: entity.offset, insertionString: "<a href=\"user://" + messageText.substring(entity.offset, ( entity.offset + entity.length )) + "\">", removeLength: 0 },