Skip auto mark read on rule move

This commit is contained in:
M66B 2019-01-18 08:43:29 +00:00
parent 15b56a671d
commit c995179237
2 changed files with 6 additions and 4 deletions

View File

@ -127,7 +127,7 @@ public class EntityRule {
private void onActionMove(Context context, DB db, EntityMessage message, JSONObject jargs) throws JSONException {
long target = jargs.getLong("target");
EntityOperation.queue(context, db, message, EntityOperation.MOVE, target);
EntityOperation.queue(context, db, message, EntityOperation.MOVE, target, false);
}
@Override

View File

@ -1713,9 +1713,11 @@ public class ServiceSynchronize extends LifecycleService {
if (imessage == null)
throw new MessageRemovedException();
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
if (prefs.getBoolean("autoread", false) && !imessage.isSet(Flags.Flag.SEEN))
imessage.setFlag(Flags.Flag.SEEN, true);
if (jargs.length() == 1 || jargs.getBoolean(1)) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
if (prefs.getBoolean("autoread", false) && !imessage.isSet(Flags.Flag.SEEN))
imessage.setFlag(Flags.Flag.SEEN, true);
}
if (istore.hasCapability("MOVE") && !EntityFolder.DRAFTS.equals(folder.type)) {
Folder itarget = istore.getFolder(target.name);