From 96f6e28c681f5e856b8f44265b7c1b981af1b230 Mon Sep 17 00:00:00 2001 From: inorichi Date: Wed, 2 Dec 2015 10:48:08 +0100 Subject: [PATCH] Rename variable to a more suitable one (keeping column name for backwards compatibility) --- .../java/eu/kanade/mangafeed/data/database/models/Manga.java | 4 ++-- .../eu/kanade/mangafeed/data/database/tables/MangaTable.java | 4 ++-- .../kanade/mangafeed/ui/manga/chapter/ChaptersPresenter.java | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/eu/kanade/mangafeed/data/database/models/Manga.java b/app/src/main/java/eu/kanade/mangafeed/data/database/models/Manga.java index f17f233c87..c3dfc122f7 100644 --- a/app/src/main/java/eu/kanade/mangafeed/data/database/models/Manga.java +++ b/app/src/main/java/eu/kanade/mangafeed/data/database/models/Manga.java @@ -51,8 +51,8 @@ public class Manga { @StorIOSQLiteColumn(name = MangaTable.COLUMN_VIEWER) public int viewer; - @StorIOSQLiteColumn(name = MangaTable.COLUMN_CHAPTER_ORDER) - public int chapter_order; + @StorIOSQLiteColumn(name = MangaTable.COLUMN_CHAPTER_FLAGS) + public int chapter_flags; public int unread; diff --git a/app/src/main/java/eu/kanade/mangafeed/data/database/tables/MangaTable.java b/app/src/main/java/eu/kanade/mangafeed/data/database/tables/MangaTable.java index df6a7f2fed..73b2e4df93 100644 --- a/app/src/main/java/eu/kanade/mangafeed/data/database/tables/MangaTable.java +++ b/app/src/main/java/eu/kanade/mangafeed/data/database/tables/MangaTable.java @@ -50,7 +50,7 @@ public class MangaTable { public static final String COLUMN_VIEWER = "viewer"; @NonNull - public static final String COLUMN_CHAPTER_ORDER = "chapter_order"; + public static final String COLUMN_CHAPTER_FLAGS = "chapter_order"; @NonNull public static final String COLUMN_UNREAD = "unread"; @@ -79,7 +79,7 @@ public class MangaTable { + COLUMN_LAST_UPDATE + " LONG, " + COLUMN_INITIALIZED + " BOOLEAN NOT NULL, " + COLUMN_VIEWER + " INTEGER NOT NULL, " - + COLUMN_CHAPTER_ORDER + " INTEGER NOT NULL" + + COLUMN_CHAPTER_FLAGS + " INTEGER NOT NULL" + ");" + "CREATE INDEX " + TABLE + "_" + COLUMN_URL + "_index ON " + TABLE + "(" + COLUMN_URL + ");"; diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/manga/chapter/ChaptersPresenter.java b/app/src/main/java/eu/kanade/mangafeed/ui/manga/chapter/ChaptersPresenter.java index 459cfe7135..5b64c2b50e 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/manga/chapter/ChaptersPresenter.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/manga/chapter/ChaptersPresenter.java @@ -168,8 +168,7 @@ public class ChaptersPresenter extends BasePresenter { } } - - public void checkIsChapterDownloaded(Chapter chapter) { + private void checkIsChapterDownloaded(Chapter chapter) { for (Download download : downloadManager.getQueue().get()) { if (chapter.id == download.chapter.id) { chapter.status = download.getStatus();