|
|
@ -18,6 +18,7 @@ |
|
|
|
package org.floens.chan.core.model; |
|
|
|
package org.floens.chan.core.model; |
|
|
|
|
|
|
|
|
|
|
|
import android.os.Parcel; |
|
|
|
import android.os.Parcel; |
|
|
|
|
|
|
|
import android.text.TextUtils; |
|
|
|
|
|
|
|
|
|
|
|
import com.j256.ormlite.field.DatabaseField; |
|
|
|
import com.j256.ormlite.field.DatabaseField; |
|
|
|
import com.j256.ormlite.table.DatabaseTable; |
|
|
|
import com.j256.ormlite.table.DatabaseTable; |
|
|
@ -51,6 +52,9 @@ public class Loadable { |
|
|
|
@DatabaseField |
|
|
|
@DatabaseField |
|
|
|
public int lastViewed = -1; |
|
|
|
public int lastViewed = -1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@DatabaseField |
|
|
|
|
|
|
|
public int lastLoaded = -1; |
|
|
|
|
|
|
|
|
|
|
|
public int markedNo = -1; |
|
|
|
public int markedNo = -1; |
|
|
|
|
|
|
|
|
|
|
|
// when the title, listViewTop, listViewIndex or lastViewed were changed
|
|
|
|
// when the title, listViewTop, listViewIndex or lastViewed were changed
|
|
|
@ -87,23 +91,38 @@ public class Loadable { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setTitle(String title) { |
|
|
|
public void setTitle(String title) { |
|
|
|
this.title = title; |
|
|
|
if (!TextUtils.equals(this.title, title)) { |
|
|
|
dirty = true; |
|
|
|
this.title = title; |
|
|
|
|
|
|
|
dirty = true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setLastViewed(int lastViewed) { |
|
|
|
public void setLastViewed(int lastViewed) { |
|
|
|
this.lastViewed = lastViewed; |
|
|
|
if (this.lastViewed != lastViewed) { |
|
|
|
dirty = true; |
|
|
|
this.lastViewed = lastViewed; |
|
|
|
|
|
|
|
dirty = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setLastLoaded(int lastLoaded) { |
|
|
|
|
|
|
|
if (this.lastLoaded != lastLoaded) { |
|
|
|
|
|
|
|
this.lastLoaded = lastLoaded; |
|
|
|
|
|
|
|
dirty = true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setListViewTop(int listViewTop) { |
|
|
|
public void setListViewTop(int listViewTop) { |
|
|
|
this.listViewTop = listViewTop; |
|
|
|
if (this.listViewTop != listViewTop) { |
|
|
|
dirty = true; |
|
|
|
this.listViewTop = listViewTop; |
|
|
|
|
|
|
|
dirty = true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setListViewIndex(int listViewIndex) { |
|
|
|
public void setListViewIndex(int listViewIndex) { |
|
|
|
this.listViewIndex = listViewIndex; |
|
|
|
if (this.listViewIndex != listViewIndex) { |
|
|
|
dirty = true; |
|
|
|
this.listViewIndex = listViewIndex; |
|
|
|
|
|
|
|
dirty = true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -157,6 +176,7 @@ public class Loadable { |
|
|
|
", listViewIndex=" + listViewIndex + |
|
|
|
", listViewIndex=" + listViewIndex + |
|
|
|
", listViewTop=" + listViewTop + |
|
|
|
", listViewTop=" + listViewTop + |
|
|
|
", lastViewed=" + lastViewed + |
|
|
|
", lastViewed=" + lastViewed + |
|
|
|
|
|
|
|
", lastLoaded=" + lastLoaded + |
|
|
|
", markedNo=" + markedNo + |
|
|
|
", markedNo=" + markedNo + |
|
|
|
", dirty=" + dirty + |
|
|
|
", dirty=" + dirty + |
|
|
|
'}'; |
|
|
|
'}'; |
|
|
@ -202,6 +222,7 @@ public class Loadable { |
|
|
|
copy.listViewIndex = listViewIndex; |
|
|
|
copy.listViewIndex = listViewIndex; |
|
|
|
copy.listViewTop = listViewTop; |
|
|
|
copy.listViewTop = listViewTop; |
|
|
|
copy.lastViewed = lastViewed; |
|
|
|
copy.lastViewed = lastViewed; |
|
|
|
|
|
|
|
copy.lastLoaded = lastLoaded; |
|
|
|
|
|
|
|
|
|
|
|
return copy; |
|
|
|
return copy; |
|
|
|
} |
|
|
|
} |
|
|
|