Browse Source

Removed edit trash

main
M66B 6 years ago
parent
commit
4bdafd77d9
3 changed files with 0 additions and 63 deletions
  1. +0
    -56
      app/src/main/java/eu/faircode/email/FragmentMessage.java
  2. +0
    -6
      app/src/main/res/menu/action_view_top.xml
  3. +0
    -1
      app/src/main/res/values/strings.xml

+ 0
- 56
app/src/main/java/eu/faircode/email/FragmentMessage.java View File

@ -189,9 +189,6 @@ public class FragmentMessage extends FragmentEx {
case R.id.action_seen:
onActionSeen(id);
return true;
case R.id.action_edit:
onActionEdit(id);
return true;
case R.id.action_forward:
onActionForward(id);
return true;
@ -414,7 +411,6 @@ public class FragmentMessage extends FragmentEx {
top_navigation.getMenu().findItem(R.id.action_thread).setVisible(message.count > 1);
top_navigation.getMenu().findItem(R.id.action_seen).setVisible(!inOutbox);
top_navigation.getMenu().findItem(R.id.action_edit).setVisible(inTrash);
top_navigation.getMenu().findItem(R.id.action_forward).setVisible(!inOutbox);
top_navigation.getMenu().findItem(R.id.action_reply_all).setVisible(!inOutbox && message.cc != null);
if (!free)
@ -540,58 +536,6 @@ public class FragmentMessage extends FragmentEx {
}.load(this, args);
}
private void onActionEdit(final long id) {
Helper.setViewsEnabled(view, false);
Bundle args = new Bundle();
args.putLong("id", id);
new SimpleTask<Void>() {
@Override
protected Void onLoad(Context context, Bundle args) {
long id = args.getLong("id");
DB db = DB.getInstance(context);
try {
db.beginTransaction();
EntityMessage draft = db.message().getMessage(id);
EntityFolder drafts = db.folder().getFolderByType(draft.account, EntityFolder.DRAFTS);
draft.id = null;
draft.folder = drafts.id;
draft.uid = null;
draft.msgid = EntityMessage.generateMessageId();
draft.id = db.message().insertMessage(draft);
EntityOperation.queue(db, draft, EntityOperation.ADD);
db.setTransactionSuccessful();
} finally {
db.endTransaction();
}
EntityOperation.process(context);
return null;
}
@Override
protected void onLoaded(Bundle args, Void data) {
Helper.setViewsEnabled(view, true);
getContext().startActivity(
new Intent(getContext(), ActivityCompose.class)
.putExtra("action", "edit")
.putExtra("id", id));
}
@Override
public void onException(Bundle args, Throwable ex) {
Helper.setViewsEnabled(view, true);
Toast.makeText(getContext(), ex.toString(), Toast.LENGTH_LONG).show();
}
}.load(this, args);
}
private void onActionForward(long id) {
startActivity(new Intent(getContext(), ActivityCompose.class)
.putExtra("action", "forward")


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

@ -14,12 +14,6 @@
android:title="@string/title_seen"
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_edit"
android:icon="@drawable/baseline_edit_24"
android:title="@string/title_edit"
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_forward"
android:icon="@drawable/baseline_forward_24"


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

@ -128,7 +128,6 @@
<string name="title_thread">Thread</string>
<string name="title_seen">Read</string>
<string name="title_unseen">Unread</string>
<string name="title_edit">Edit</string>
<string name="title_forward">Forward</string>
<string name="title_reply_all">Reply to all</string>


Loading…
Cancel
Save