mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-23 22:51:02 +00:00
Removed edit trash
This commit is contained in:
parent
61701f1e6a
commit
4bdafd77d9
3 changed files with 0 additions and 63 deletions
|
@ -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")
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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…
Reference in a new issue