Hide disappearing messages menu for coordinated release

// FREEBIE
This commit is contained in:
Moxie Marlinspike 2016-08-28 17:05:30 -07:00
parent d7e4928f22
commit 059ff3e2e1

View File

@ -383,25 +383,25 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
MenuInflater inflater = this.getMenuInflater(); MenuInflater inflater = this.getMenuInflater();
menu.clear(); menu.clear();
if (isSecureText) { // if (isSecureText) {
if (recipients.getExpireMessages() > 0) { // if (recipients.getExpireMessages() > 0) {
inflater.inflate(R.menu.conversation_expiring_on, menu); // inflater.inflate(R.menu.conversation_expiring_on, menu);
//
final MenuItem item = menu.findItem(R.id.menu_expiring_messages); // final MenuItem item = menu.findItem(R.id.menu_expiring_messages);
final View actionView = MenuItemCompat.getActionView(item); // final View actionView = MenuItemCompat.getActionView(item);
final TextView badgeView = (TextView)actionView.findViewById(R.id.expiration_badge); // final TextView badgeView = (TextView)actionView.findViewById(R.id.expiration_badge);
//
badgeView.setText(ExpirationUtil.getExpirationAbbreviatedDisplayValue(this, recipients.getExpireMessages())); // badgeView.setText(ExpirationUtil.getExpirationAbbreviatedDisplayValue(this, recipients.getExpireMessages()));
actionView.setOnClickListener(new OnClickListener() { // actionView.setOnClickListener(new OnClickListener() {
@Override // @Override
public void onClick(View v) { // public void onClick(View v) {
onOptionsItemSelected(item); // onOptionsItemSelected(item);
} // }
}); // });
} else { // } else {
inflater.inflate(R.menu.conversation_expiring_off, menu); // inflater.inflate(R.menu.conversation_expiring_off, menu);
} // }
} // }
if (isSingleConversation()) { if (isSingleConversation()) {
if (isSecureVoice) inflater.inflate(R.menu.conversation_callable_secure, menu); if (isSecureVoice) inflater.inflate(R.menu.conversation_callable_secure, menu);