Export/import account move to

This commit is contained in:
M66B 2019-10-23 15:29:22 +02:00
parent 75f03cad49
commit 5eb7975899
2 changed files with 9 additions and 0 deletions

View File

@ -751,10 +751,12 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
// Forward referenced // Forward referenced
Long swipe_left = account.swipe_left; Long swipe_left = account.swipe_left;
Long swipe_right = account.swipe_right; Long swipe_right = account.swipe_right;
Long move_to = account.move_to;
if (account.swipe_left != null && account.swipe_left > 0) if (account.swipe_left != null && account.swipe_left > 0)
account.swipe_left = null; account.swipe_left = null;
if (account.swipe_right != null && account.swipe_right > 0) if (account.swipe_right != null && account.swipe_right > 0)
account.swipe_right = null; account.swipe_right = null;
account.move_to = null;
account.created = new Date().getTime(); account.created = new Date().getTime();
account.id = db.account().insertAccount(account); account.id = db.account().insertAccount(account);
@ -810,6 +812,8 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
account.swipe_left = folder.id; account.swipe_left = folder.id;
if (Objects.equals(swipe_right, id)) if (Objects.equals(swipe_right, id))
account.swipe_right = folder.id; account.swipe_right = folder.id;
if (Objects.equals(move_to, id))
account.move_to = folder.id;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (jfolder.has("channel")) { if (jfolder.has("channel")) {

View File

@ -180,6 +180,8 @@ public class EntityAccount extends EntityOrder implements Serializable {
json.put("swipe_left", swipe_left); json.put("swipe_left", swipe_left);
json.put("swipe_right", swipe_right); json.put("swipe_right", swipe_right);
json.put("move_to", move_to);
json.put("poll_interval", poll_interval); json.put("poll_interval", poll_interval);
json.put("partial_fetch", partial_fetch); json.put("partial_fetch", partial_fetch);
json.put("ignore_size", ignore_size); json.put("ignore_size", ignore_size);
@ -233,6 +235,9 @@ public class EntityAccount extends EntityOrder implements Serializable {
if (json.has("swipe_right")) if (json.has("swipe_right"))
account.swipe_right = json.getLong("swipe_right"); account.swipe_right = json.getLong("swipe_right");
if (json.has("move_to"))
account.move_to = json.getLong("move_to");
account.poll_interval = json.getInt("poll_interval"); account.poll_interval = json.getInt("poll_interval");
account.partial_fetch = json.optBoolean("partial_fetch", true); account.partial_fetch = json.optBoolean("partial_fetch", true);