mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-02 19:10:11 +01:00
Added rule type copy
This commit is contained in:
@@ -84,6 +84,7 @@ public class EntityRule {
|
||||
static final int TYPE_ANSWER = 4;
|
||||
static final int TYPE_AUTOMATION = 5;
|
||||
static final int TYPE_FLAG = 6;
|
||||
static final int TYPE_COPY = 7;
|
||||
|
||||
static final String ACTION_AUTOMATION = BuildConfig.APPLICATION_ID + ".AUTOMATION";
|
||||
static final String EXTRA_RULE = "rule";
|
||||
@@ -213,6 +214,9 @@ public class EntityRule {
|
||||
case TYPE_MOVE:
|
||||
onActionMove(context, db, message, jaction);
|
||||
break;
|
||||
case TYPE_COPY:
|
||||
onActionCopy(context, db, message, jaction);
|
||||
break;
|
||||
case TYPE_ANSWER:
|
||||
onActionAnswer(context, db, message, jaction);
|
||||
break;
|
||||
@@ -235,6 +239,11 @@ public class EntityRule {
|
||||
EntityOperation.queue(context, db, message, EntityOperation.MOVE, target, false);
|
||||
}
|
||||
|
||||
private void onActionCopy(Context context, DB db, EntityMessage message, JSONObject jargs) throws JSONException {
|
||||
long target = jargs.getLong("target");
|
||||
EntityOperation.queue(context, db, message, EntityOperation.COPY, target, false);
|
||||
}
|
||||
|
||||
private void onActionAnswer(Context context, DB db, EntityMessage message, JSONObject jargs) throws JSONException, IOException {
|
||||
long iid = jargs.getLong("identity");
|
||||
long aid = jargs.getLong("answer");
|
||||
|
||||
Reference in New Issue
Block a user