From ea8e420f90dc3d294f61b21d74249bb71746bc45 Mon Sep 17 00:00:00 2001 From: Mariotaku Lee Date: Sat, 26 Mar 2016 21:35:47 +0800 Subject: [PATCH] improved reply screen name --- .../org/mariotaku/twidere/activity/ComposeActivity.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/twidere/src/main/java/org/mariotaku/twidere/activity/ComposeActivity.java b/twidere/src/main/java/org/mariotaku/twidere/activity/ComposeActivity.java index 7533e0cce..d960d0501 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/activity/ComposeActivity.java +++ b/twidere/src/main/java/org/mariotaku/twidere/activity/ComposeActivity.java @@ -1125,8 +1125,8 @@ public class ComposeActivity extends BaseActivity implements OnMenuItemClickList private boolean handleReplyIntent(final ParcelableStatus status) { if (status == null || status.id == null) return false; - final String myScreenName = DataStoreUtils.getAccountScreenName(this, status.account_key); - if (TextUtils.isEmpty(myScreenName)) return false; + final ParcelableAccount account = ParcelableAccountUtils.getAccount(this, status.account_key); + if (account == null) return false; int selectionStart = 0; final Collection mentions = new TreeSet<>(String.CASE_INSENSITIVE_ORDER); mEditText.append("@" + status.user_screen_name + " "); @@ -1159,7 +1159,8 @@ public class ComposeActivity extends BaseActivity implements OnMenuItemClickList } for (final String mention : mentions) { - if (mention.equalsIgnoreCase(status.user_screen_name)) { + if (mention.equalsIgnoreCase(status.user_screen_name) || + mention.equalsIgnoreCase(account.screen_name)) { continue; } mEditText.append("@" + mention + " ");