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

@@ -59,7 +59,7 @@ import static androidx.room.ForeignKey.CASCADE;
}
)
public class EntityFolder implements Serializable {
public class EntityFolder extends EntityOrder implements Serializable {
static final String TABLE_NAME = "folder";
@PrimaryKey(autoGenerate = true)
@@ -84,7 +84,6 @@ public class EntityFolder implements Serializable {
@NonNull
public Integer keep_days;
public String display;
public Integer order;
@NonNull
public Boolean hide = false;
@NonNull
@@ -227,6 +226,16 @@ public class EntityFolder implements Serializable {
return (display == null ? Helper.localizeFolderName(context, n) : display);
}
@Override
Long getSortId() {
return id;
}
@Override
String getSortTitle(Context context) {
return Helper.localizeFolderName(context, name);
}
boolean isOutgoing() {
return isOutgoing(this.type);
}