mirror of https://github.com/M66B/FairEmail.git
Refactoring
This commit is contained in:
parent
b7df1875ac
commit
b017bc897d
|
@ -195,8 +195,8 @@ public class EntityRule {
|
||||||
|
|
||||||
void execute(Context context, DB db, EntityMessage message) throws IOException {
|
void execute(Context context, DB db, EntityMessage message) throws IOException {
|
||||||
try {
|
try {
|
||||||
JSONObject jargs = new JSONObject(action);
|
JSONObject jaction = new JSONObject(action);
|
||||||
int type = jargs.getInt("type");
|
int type = jaction.getInt("type");
|
||||||
Log.i("Executing rule=" + type + ":" + name + " message=" + message.id);
|
Log.i("Executing rule=" + type + ":" + name + " message=" + message.id);
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
@ -207,13 +207,13 @@ public class EntityRule {
|
||||||
onActionSeen(context, db, message, false);
|
onActionSeen(context, db, message, false);
|
||||||
break;
|
break;
|
||||||
case TYPE_MOVE:
|
case TYPE_MOVE:
|
||||||
onActionMove(context, db, message, jargs);
|
onActionMove(context, db, message, jaction);
|
||||||
break;
|
break;
|
||||||
case TYPE_ANSWER:
|
case TYPE_ANSWER:
|
||||||
onActionAnswer(context, db, message, jargs);
|
onActionAnswer(context, db, message, jaction);
|
||||||
break;
|
break;
|
||||||
case TYPE_AUTOMATION:
|
case TYPE_AUTOMATION:
|
||||||
onActionAutomation(context, db, message, jargs);
|
onActionAutomation(context, db, message, jaction);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch (JSONException ex) {
|
} catch (JSONException ex) {
|
||||||
|
|
Loading…
Reference in New Issue