Simplification

This commit is contained in:
M66B 2022-01-04 13:13:08 +01:00
parent afa6ac887b
commit a0a6ae2681
2 changed files with 4 additions and 5 deletions

View File

@ -406,9 +406,10 @@ public class EntityOperation {
} else if (DELETE.equals(name)) { } else if (DELETE.equals(name)) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean perform_expunge = prefs.getBoolean("perform_expunge", true); boolean perform_expunge = prefs.getBoolean("perform_expunge", true);
if (perform_expunge) if (perform_expunge) {
db.message().setMessageUiHide(message.id, true); message.ui_hide = true;
else { db.message().setMessageUiHide(message.id, message.ui_hide);
} else {
message.ui_deleted = !message.ui_deleted; message.ui_deleted = !message.ui_deleted;
db.message().setMessageUiDeleted(message.id, message.ui_deleted); db.message().setMessageUiDeleted(message.id, message.ui_deleted);
} }

View File

@ -943,8 +943,6 @@ public class EntityRule {
private boolean onActionDelete(Context context, EntityMessage message, JSONObject jargs) { private boolean onActionDelete(Context context, EntityMessage message, JSONObject jargs) {
EntityOperation.queue(context, message, EntityOperation.DELETE); EntityOperation.queue(context, message, EntityOperation.DELETE);
message.ui_hide = true;
return true; return true;
} }