mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-19 15:31:13 +01:00
Use local filtering. Use long class instead of primitives again for database keys (they can be null)
This commit is contained in:
@@ -10,10 +10,10 @@ import eu.kanade.mangafeed.util.UrlUtil;
|
||||
public class Chapter {
|
||||
|
||||
@StorIOSQLiteColumn(name = ChapterTable.COLUMN_ID, key = true)
|
||||
public long id;
|
||||
public Long id;
|
||||
|
||||
@StorIOSQLiteColumn(name = ChapterTable.COLUMN_MANGA_ID)
|
||||
public long manga_id;
|
||||
public Long manga_id;
|
||||
|
||||
@StorIOSQLiteColumn(name = ChapterTable.COLUMN_URL)
|
||||
public String url;
|
||||
|
||||
@@ -10,7 +10,7 @@ import eu.kanade.mangafeed.util.UrlUtil;
|
||||
public class Manga {
|
||||
|
||||
@StorIOSQLiteColumn(name = MangaTable.COLUMN_ID, key = true)
|
||||
public long id;
|
||||
public Long id;
|
||||
|
||||
@StorIOSQLiteColumn(name = MangaTable.COLUMN_SOURCE)
|
||||
public int source;
|
||||
|
||||
@@ -133,7 +133,7 @@ public class DownloadManager {
|
||||
private boolean prepareDownload(Download download) {
|
||||
// If the chapter is already queued, don't add it again
|
||||
for (Download queuedDownload : queue.get()) {
|
||||
if (download.chapter.id == queuedDownload.chapter.id)
|
||||
if (download.chapter.id.equals(queuedDownload.chapter.id))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public class DownloadQueue {
|
||||
|
||||
public void remove(Chapter chapter) {
|
||||
for (Download download : queue) {
|
||||
if (download.chapter.id == chapter.id) {
|
||||
if (download.chapter.id.equals(chapter.id)) {
|
||||
remove(download);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user