From 9e3e0e8fba4d370495297ab56b858f7eebe547ae Mon Sep 17 00:00:00 2001 From: vanita5 Date: Thu, 5 Nov 2015 21:05:49 +0100 Subject: [PATCH] fix title of the retweet button in RetweetQuoteDialogFragment --- .../fragment/support/RetweetQuoteDialogFragment.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/twidere/src/main/java/org/mariotaku/twidere/fragment/support/RetweetQuoteDialogFragment.java b/twidere/src/main/java/org/mariotaku/twidere/fragment/support/RetweetQuoteDialogFragment.java index f7a5bf76c..7d5eded23 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/fragment/support/RetweetQuoteDialogFragment.java +++ b/twidere/src/main/java/org/mariotaku/twidere/fragment/support/RetweetQuoteDialogFragment.java @@ -198,7 +198,11 @@ public class RetweetQuoteDialogFragment extends BaseSupportDialogFragment implem final AlertDialog alertDialog = (AlertDialog) dialog; final Button positiveButton = alertDialog.getButton(AlertDialog.BUTTON_POSITIVE); if (positiveButton == null) return; - positiveButton.setText(s.length() > 0 ? R.string.comment : R.string.retweet); + if (s.length() > 0) { + positiveButton.setText(R.string.comment); + } else { + positiveButton.setText(isMyRetweet(status) ? R.string.cancel_retweet : R.string.retweet); + } final String statusLink = LinkCreator.getTwitterStatusLink(status.user_screen_name, status.id).toString(); final StatusTextCountView textCountView = (StatusTextCountView) alertDialog.findViewById(R.id.comment_text_count); textCountView.setTextCount(mValidator.getTweetLength(s + " " + statusLink));