mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-02 15:18:56 +01:00
save per-manga sort order
This commit is contained in:
@@ -68,6 +68,10 @@ public class Manga implements Serializable {
|
||||
public static final int COMPLETED = 2;
|
||||
public static final int LICENSED = 3;
|
||||
|
||||
public static final int SORT_AZ = 0;
|
||||
public static final int SORT_ZA = 1;
|
||||
public static final int SORT_MASK = 1;
|
||||
|
||||
public Manga() {}
|
||||
|
||||
public static Manga create(String pathUrl) {
|
||||
@@ -120,6 +124,18 @@ public class Manga implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
public void setFlags(int flag, int mask) {
|
||||
chapter_flags = (chapter_flags & ~mask) | (flag & mask);
|
||||
}
|
||||
|
||||
public boolean sortChaptersAZ () {
|
||||
return (this.chapter_flags & SORT_MASK) == SORT_AZ;
|
||||
}
|
||||
|
||||
public void setChapterOrder(int order) {
|
||||
setFlags(order, SORT_MASK);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
|
||||
Reference in New Issue
Block a user