Add spoiler format style.

This commit is contained in:
Cody Henthorne
2023-03-22 16:42:30 -04:00
parent 5d6889786c
commit 43cd647036
20 changed files with 662 additions and 57 deletions

View File

@@ -32,8 +32,8 @@ public final class MentionUtil {
private MentionUtil() { }
@WorkerThread
public static @Nullable CharSequence updateBodyWithDisplayNames(@NonNull Context context, @NonNull MessageRecord messageRecord) {
return updateBodyWithDisplayNames(context, messageRecord, messageRecord.getDisplayBody(context)).getBody();
public static @NonNull UpdatedBodyAndMentions updateBodyWithDisplayNames(@NonNull Context context, @NonNull MessageRecord messageRecord) {
return updateBodyWithDisplayNames(context, messageRecord, messageRecord.getDisplayBody(context));
}
@WorkerThread

View File

@@ -59,7 +59,7 @@ fun List<BodyRange>?.toBodyRangeList(): BodyRangeList? {
when (bodyRange.style) {
BodyRange.Style.BOLD -> style = BodyRangeList.BodyRange.Style.BOLD
BodyRange.Style.ITALIC -> style = BodyRangeList.BodyRange.Style.ITALIC
BodyRange.Style.SPOILER -> Unit
BodyRange.Style.SPOILER -> style = BodyRangeList.BodyRange.Style.SPOILER
BodyRange.Style.STRIKETHROUGH -> style = BodyRangeList.BodyRange.Style.STRIKETHROUGH
BodyRange.Style.MONOSPACE -> style = BodyRangeList.BodyRange.Style.MONOSPACE
else -> Unit