mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 17:27:45 +00:00
Enable disappearing message controls
// FREEBIE
This commit is contained in:
parent
2b4d41de03
commit
14d73d82c3
@ -36,6 +36,7 @@ import android.os.Vibrator;
|
|||||||
import android.provider.Browser;
|
import android.provider.Browser;
|
||||||
import android.provider.ContactsContract;
|
import android.provider.ContactsContract;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
|
import android.support.v4.view.MenuItemCompat;
|
||||||
import android.support.v4.view.WindowCompat;
|
import android.support.v4.view.WindowCompat;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
@ -128,6 +129,7 @@ import org.thoughtcrime.securesms.util.DirectoryHelper.UserCapabilities;
|
|||||||
import org.thoughtcrime.securesms.util.DirectoryHelper.UserCapabilities.Capability;
|
import org.thoughtcrime.securesms.util.DirectoryHelper.UserCapabilities.Capability;
|
||||||
import org.thoughtcrime.securesms.util.DynamicLanguage;
|
import org.thoughtcrime.securesms.util.DynamicLanguage;
|
||||||
import org.thoughtcrime.securesms.util.DynamicTheme;
|
import org.thoughtcrime.securesms.util.DynamicTheme;
|
||||||
|
import org.thoughtcrime.securesms.util.ExpirationUtil;
|
||||||
import org.thoughtcrime.securesms.util.GroupUtil;
|
import org.thoughtcrime.securesms.util.GroupUtil;
|
||||||
import org.thoughtcrime.securesms.util.MediaUtil;
|
import org.thoughtcrime.securesms.util.MediaUtil;
|
||||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||||
@ -388,25 +390,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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user