From 9f37e5b162cd0b23090b88fac6461ec7e1918305 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 30 Jun 2021 12:55:45 +0200 Subject: [PATCH] Shark attack --- app/src/main/java/eu/faircode/email/FragmentMessages.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 750fb75243..9873dcbb69 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -2975,7 +2975,9 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. SpannableString ss = new SpannableString(title); if (account.name != null && account.color != null) { int i = title.indexOf(account.name); - ss.setSpan(new ForegroundColorSpan(account.color), i, i + 1, 0); + int first = title.codePointAt(i); + int count = Character.charCount(first); + ss.setSpan(new ForegroundColorSpan(account.color), i, i + count, 0); } MenuItem item = popupMenu.getMenu().add(Menu.NONE, R.string.title_move_to_account, order++, ss) .setIcon(R.drawable.twotone_drive_file_move_24);