mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 16:33:39 +00:00
Correct contextual send language.
1) Use "secure" and "insecure" vs "encrypted" and "unencrypted. 2) Use MMS instead of SMS where appropriate. Fixes #1602
This commit is contained in:
parent
a54d20f3ef
commit
ba1055df8e
@ -3,8 +3,13 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:title="@string/conversation_button_context__send_textsecure_message"
|
||||
android:id="@+id/menu_context_send_push" />
|
||||
<item android:title="@string/conversation_button_context__send_encrypted_sms"
|
||||
<item android:title="@string/conversation_button_context__send_secure_sms"
|
||||
android:id="@+id/menu_context_send_encrypted_sms" />
|
||||
<item android:title="@string/conversation_button_context__send_unencrypted_sms"
|
||||
<item android:title="@string/conversation_button_context__send_insecure_sms"
|
||||
android:id="@+id/menu_context_send_unencrypted_sms" />
|
||||
<item android:title="@string/conversation_button_context__send_secure_mms"
|
||||
android:id="@+id/menu_context_send_encrypted_mms" />
|
||||
<item android:title="@string/conversation_button_context__send_insecure_mms"
|
||||
android:id="@+id/menu_context_send_unencrypted_mms" />
|
||||
|
||||
</menu>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:title="@string/conversation_button_context__send_textsecure_message"
|
||||
android:id="@+id/menu_context_send_push" />
|
||||
<item android:title="@string/conversation_button_context__send_unencrypted_sms"
|
||||
android:id="@+id/menu_context_send_unencrypted_sms" />
|
||||
</menu>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:title="@string/conversation_button_context__send_encrypted_sms"
|
||||
android:id="@+id/menu_context_send_encrypted_sms" />
|
||||
<item android:title="@string/conversation_button_context__send_unencrypted_sms"
|
||||
android:id="@+id/menu_context_send_unencrypted_sms" />
|
||||
</menu>
|
@ -787,8 +787,10 @@
|
||||
|
||||
<!-- conversation_button_context -->
|
||||
<string name="conversation_button_context__send_textsecure_message">Send TextSecure message</string>
|
||||
<string name="conversation_button_context__send_unencrypted_sms">Send unencrypted SMS</string>
|
||||
<string name="conversation_button_context__send_encrypted_sms">Send encrypted SMS</string>
|
||||
<string name="conversation_button_context__send_secure_sms">Send secure SMS</string>
|
||||
<string name="conversation_button_context__send_insecure_sms">Send insecure SMS</string>
|
||||
<string name="conversation_button_context__send_secure_mms">Send secure MMS</string>
|
||||
<string name="conversation_button_context__send_insecure_mms">Send insecure MMS</string>
|
||||
|
||||
<!-- conversation_callable -->
|
||||
<string name="conversation_callable__menu_call">Call</string>
|
||||
|
@ -322,14 +322,24 @@ public class ConversationActivity extends PassphraseRequiredSherlockFragmentActi
|
||||
Recipient primaryRecipient = getRecipients() == null ? null : getRecipients().getPrimaryRecipient();
|
||||
boolean hasSession = Session.hasSession(this, masterSecret, primaryRecipient);
|
||||
|
||||
int context;
|
||||
getMenuInflater().inflate(R.menu.conversation_button_context, menu);
|
||||
|
||||
if (isPushDestination && hasSession) context = R.menu.conversation_button_context_secure_push;
|
||||
else if (isPushDestination) context = R.menu.conversation_button_context_insecure_push;
|
||||
else if (hasSession) context = R.menu.conversation_button_context_secure_sms;
|
||||
else return;
|
||||
if (attachmentManager.isAttachmentPresent()) {
|
||||
menu.removeItem(R.id.menu_context_send_encrypted_sms);
|
||||
menu.removeItem(R.id.menu_context_send_unencrypted_sms);
|
||||
} else {
|
||||
menu.removeItem(R.id.menu_context_send_encrypted_mms);
|
||||
menu.removeItem(R.id.menu_context_send_unencrypted_mms);
|
||||
}
|
||||
|
||||
getMenuInflater().inflate(context, menu);
|
||||
if (!isPushDestination) {
|
||||
menu.removeItem(R.id.menu_context_send_push);
|
||||
}
|
||||
|
||||
if (!hasSession) {
|
||||
menu.removeItem(R.id.menu_context_send_encrypted_mms);
|
||||
menu.removeItem(R.id.menu_context_send_encrypted_sms);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -337,7 +347,9 @@ public class ConversationActivity extends PassphraseRequiredSherlockFragmentActi
|
||||
public boolean onContextItemSelected(android.view.MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.menu_context_send_push: sendMessage(false, false); return true;
|
||||
case R.id.menu_context_send_encrypted_mms:
|
||||
case R.id.menu_context_send_encrypted_sms: sendMessage(false, true); return true;
|
||||
case R.id.menu_context_send_unencrypted_mms:
|
||||
case R.id.menu_context_send_unencrypted_sms: sendMessage(true, true); return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user