Browse Source

Moved encrypt to menu

main
M66B 6 years ago
parent
commit
e31b3967f3
4 changed files with 13 additions and 9 deletions
  1. +5
    -2
      app/src/main/java/eu/faircode/email/FragmentCompose.java
  2. +0
    -5
      app/src/main/res/menu/action_compose.xml
  3. +6
    -0
      app/src/main/res/menu/menu_compose.xml
  4. +2
    -2
      app/src/main/res/values/strings.xml

+ 5
- 2
app/src/main/java/eu/faircode/email/FragmentCompose.java View File

@ -423,6 +423,9 @@ public class FragmentCompose extends FragmentEx {
case R.id.menu_addresses: case R.id.menu_addresses:
onMenuAddresses(); onMenuAddresses();
return true; return true;
case R.id.menu_encrypt:
onAction(R.id.menu_encrypt);
return true;
default: default:
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);
} }
@ -1371,7 +1374,7 @@ public class FragmentCompose extends FragmentEx {
Toast.makeText(context, R.string.title_draft_deleted, Toast.LENGTH_LONG).show(); Toast.makeText(context, R.string.title_draft_deleted, Toast.LENGTH_LONG).show();
} }
}); });
} else if (action == R.id.action_save || action == R.id.action_encrypt) {
} else if (action == R.id.action_save || action == R.id.menu_encrypt) {
db.message().updateMessage(draft); db.message().updateMessage(draft);
draft.write(context, body); draft.write(context, body);
@ -1462,7 +1465,7 @@ public class FragmentCompose extends FragmentEx {
} else if (action == R.id.action_save) { } else if (action == R.id.action_save) {
// Do nothing // Do nothing
} else if (action == R.id.action_encrypt) {
} else if (action == R.id.menu_encrypt) {
onEncrypt(); onEncrypt();
} else if (action == R.id.action_send) { } else if (action == R.id.action_send) {


+ 0
- 5
app/src/main/res/menu/action_compose.xml View File

@ -11,11 +11,6 @@
android:icon="@drawable/baseline_save_alt_24" android:icon="@drawable/baseline_save_alt_24"
android:title="@string/title_save" /> android:title="@string/title_save" />
<item
android:id="@+id/action_encrypt"
android:icon="@drawable/baseline_lock_24"
android:title="@string/title_encrypt" />
<item <item
android:id="@+id/action_send" android:id="@+id/action_send"
android:icon="@drawable/baseline_send_24" android:icon="@drawable/baseline_send_24"


+ 6
- 0
app/src/main/res/menu/menu_compose.xml View File

@ -37,4 +37,10 @@
android:icon="@drawable/baseline_people_24" android:icon="@drawable/baseline_people_24"
android:title="@string/title_show_addresses" android:title="@string/title_show_addresses"
app:showAsAction="ifRoom" /> app:showAsAction="ifRoom" />
<item
android:id="@+id/menu_encrypt"
android:icon="@drawable/baseline_lock_24"
android:title="@string/title_encrypt"
app:showAsAction="ifRoom" />
</menu> </menu>

+ 2
- 2
app/src/main/res/values/strings.xml View File

@ -182,7 +182,6 @@
<string name="title_reply_all">Reply to all</string> <string name="title_reply_all">Reply to all</string>
<string name="title_show_headers">Show headers</string> <string name="title_show_headers">Show headers</string>
<string name="title_show_html">Show original</string> <string name="title_show_html">Show original</string>
<string name="title_decrypt">Decrypt</string>
<string name="title_trash">Trash</string> <string name="title_trash">Trash</string>
<string name="title_delete">Delete</string> <string name="title_delete">Delete</string>
@ -212,7 +211,6 @@
<string name="title_body_hint">Your message</string> <string name="title_body_hint">Your message</string>
<string name="title_discard">Discard</string> <string name="title_discard">Discard</string>
<string name="title_save">Save</string> <string name="title_save">Save</string>
<string name="title_encrypt">Encrypt</string>
<string name="title_send">Send</string> <string name="title_send">Send</string>
<string name="title_clipboard_empty">Clipboard empty</string> <string name="title_clipboard_empty">Clipboard empty</string>
@ -230,6 +228,8 @@
<string name="title_draft_saved">Draft saved</string> <string name="title_draft_saved">Draft saved</string>
<string name="title_queued">Sending message</string> <string name="title_queued">Sending message</string>
<string name="title_encrypt">Encrypt</string>
<string name="title_decrypt">Decrypt</string>
<string name="title_no_openpgp">OpenKeychain not found</string> <string name="title_no_openpgp">OpenKeychain not found</string>
<string name="title_search">Search</string> <string name="title_search">Search</string>


Loading…
Cancel
Save