mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-03 09:02:19 +00:00
Fix notifications for media messages without text.
They now read 'media message' in italics. Closes #2649
This commit is contained in:
committed by
Moxie Marlinspike
parent
96896bf8f1
commit
2011391e65
@@ -10,8 +10,12 @@ import android.text.style.StyleSpan;
|
||||
public class SpanUtil {
|
||||
|
||||
public static CharSequence italic(CharSequence sequence) {
|
||||
return italic(sequence, sequence.length());
|
||||
}
|
||||
|
||||
public static CharSequence italic(CharSequence sequence, int length) {
|
||||
SpannableString spannable = new SpannableString(sequence);
|
||||
spannable.setSpan(new StyleSpan(android.graphics.Typeface.ITALIC), 0, sequence.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
spannable.setSpan(new StyleSpan(android.graphics.Typeface.ITALIC), 0, length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
return spannable;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user