diff --git a/src/org/thoughtcrime/securesms/ConversationActivity.java b/src/org/thoughtcrime/securesms/ConversationActivity.java index 11fb1b0f00..1a88a3e467 100644 --- a/src/org/thoughtcrime/securesms/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/ConversationActivity.java @@ -166,6 +166,7 @@ public class ConversationActivity extends PassphraseRequiredSherlockFragmentActi private boolean isEncryptedConversation; private boolean isAuthenticatedConversation; private boolean isMmsEnabled = true; + private boolean isCharactersLeftViewEnabled; private CharacterCalculator characterCalculator = new CharacterCalculator(); private DynamicTheme dynamicTheme = new DynamicTheme(); @@ -205,6 +206,7 @@ public class ConversationActivity extends PassphraseRequiredSherlockFragmentActi initializeEnabledCheck(); initializeMmsEnabledCheck(); initializeIme(); + initializeCharactersLeftViewEnabledCheck(); calculateCharactersRemaining(); MessageNotifier.setVisibleThread(threadId); @@ -635,6 +637,11 @@ public class ConversationActivity extends PassphraseRequiredSherlockFragmentActi sendButton.setEnabled(enabled); } + private void initializeCharactersLeftViewEnabledCheck() { + isCharactersLeftViewEnabled = !(isPushGroupConversation() || + (TextSecurePreferences.isPushRegistered(this) && !TextSecurePreferences.isSmsFallbackEnabled(this))); + } + private void initializeDraftFromDatabase() { new AsyncTask>() { @Override @@ -947,7 +954,7 @@ public class ConversationActivity extends PassphraseRequiredSherlockFragmentActi private void calculateCharactersRemaining() { int charactersSpent = composeText.getText().toString().length(); CharacterCalculator.CharacterState characterState = characterCalculator.calculateCharacters(charactersSpent); - if (characterState.charactersRemaining <= 15 && charactersLeft.getVisibility() != View.VISIBLE) { + if (characterState.charactersRemaining <= 15 && charactersLeft.getVisibility() != View.VISIBLE && isCharactersLeftViewEnabled) { charactersLeft.setVisibility(View.VISIBLE); } else if (characterState.charactersRemaining > 15 && charactersLeft.getVisibility() != View.GONE) { charactersLeft.setVisibility(View.GONE);