Moved ordering to setup

This commit is contained in:
M66B
2019-05-01 07:58:45 +02:00
parent a9bc7ad84b
commit bbe2c76ee8
20 changed files with 692 additions and 231 deletions

View File

@@ -41,7 +41,7 @@ import java.util.Objects;
indices = {
}
)
public class EntityAccount implements Serializable {
public class EntityAccount extends EntityOrder implements Serializable {
static final String TABLE_NAME = "account";
static final int DEFAULT_KEEP_ALIVE_INTERVAL = 19; // minutes
@@ -70,7 +70,6 @@ public class EntityAccount implements Serializable {
public String name;
public String signature; // obsolete
public Integer color;
public Integer order;
@NonNull
public Boolean synchronize;
@@ -119,6 +118,16 @@ public class EntityAccount implements Serializable {
nm.deleteNotificationChannel(getNotificationChannelId(id));
}
@Override
Long getSortId() {
return id;
}
@Override
String getSortTitle(Context context) {
return name;
}
public JSONObject toJSON() throws JSONException {
JSONObject json = new JSONObject();
json.put("id", id);