diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index a4ed173d31..c2f2da67cf 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -92,7 +92,6 @@ import android.widget.CompoundButton; import android.widget.EditText; import android.widget.ImageButton; import android.widget.ImageView; -import android.widget.Spinner; import android.widget.TextView; import android.widget.Toast; @@ -3292,6 +3291,15 @@ public class AdapterMessage extends RecyclerView.Adapter() { + @Override + protected Void onExecute(Context context, Bundle args) throws Throwable { + long id = args.getLong("id"); + Integer importance = args.getInt("importance"); + if (EntityMessage.PRIORITIY_NORMAL.equals(importance)) + importance = null; + + DB db = DB.getInstance(context); + db.message().setMessageImportance(id, importance); + + return null; + } + + @Override + protected void onException(Bundle args, Throwable ex) { + Log.unexpectedError(parentFragment.getParentFragmentManager(), ex); + } + }.execute(context, owner, args, "importance:set"); + } + private void onMenuDelete(final TupleMessageEx message) { Bundle aargs = new Bundle(); aargs.putString("question", context.getString(R.string.title_ask_delete)); @@ -3634,17 +3665,6 @@ public class AdapterMessage extends RecyclerView.Adapter() { - @Override - protected Void onExecute(Context context, Bundle args) throws Throwable { - long id = args.getLong("id"); - Integer importance = args.getInt("importance"); - if (EntityMessage.PRIORITIY_NORMAL.equals(importance)) - importance = null; - - DB db = DB.getInstance(context); - db.message().setMessageImportance(id, importance); - - return null; - } - - @Override - protected void onException(Bundle args, Throwable ex) { - Log.unexpectedError(getParentFragmentManager(), ex); - } - }.execute(getContext(), getViewLifecycleOwner(), args, "importance: set"); - } - }) - .setNegativeButton(android.R.string.cancel, null) - .create(); - } - } - public static class FragmentDialogKeywordManage extends FragmentDialogBase { @NonNull @Override diff --git a/app/src/main/res/layout/dialog_importance.xml b/app/src/main/res/layout/dialog_importance.xml deleted file mode 100644 index f6e4e667ca..0000000000 --- a/app/src/main/res/layout/dialog_importance.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/menu/popup_message_more.xml b/app/src/main/res/menu/popup_message_more.xml index 535fbcee31..c26452342b 100644 --- a/app/src/main/res/menu/popup_message_more.xml +++ b/app/src/main/res/menu/popup_message_more.xml @@ -16,6 +16,22 @@ android:id="@+id/menu_flag_color" android:title="@string/title_flag_color" /> + + + + + + + + @@ -32,10 +48,6 @@ android:id="@+id/menu_create_rule" android:title="@string/title_create_rule" /> - - diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8234cb0952..d45475b89d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -633,6 +633,10 @@ Add star Colored star … Remove star + Set importance + Low + Normal + High Forward New message Edit as new