From c95f1a09c761c8da21d35e64e26c23885e082165 Mon Sep 17 00:00:00 2001 From: raulhaag <2048339+raulhaag@users.noreply.github.com> Date: Sun, 3 May 2020 12:41:15 -0300 Subject: [PATCH] save status after init --- app/src/main/java/ar/rulosoft/mimanganu/MangaFragment.java | 2 -- app/src/main/java/ar/rulosoft/mimanganu/ReaderFragment.java | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/ar/rulosoft/mimanganu/MangaFragment.java b/app/src/main/java/ar/rulosoft/mimanganu/MangaFragment.java index 1899b472..27038c08 100644 --- a/app/src/main/java/ar/rulosoft/mimanganu/MangaFragment.java +++ b/app/src/main/java/ar/rulosoft/mimanganu/MangaFragment.java @@ -765,14 +765,12 @@ protected void onPostExecute(Void result) { private class DeleteImages extends AsyncTask { private ServerBase serverBase; private int selectionSize = 0; - private Chapter chapter; private int current = 0; private ExecutorService es; DeleteImages(ServerBase serverBase, int selectionSize) { this.serverBase = serverBase; this.selectionSize = selectionSize; - mNotifyID_DeleteImages = (int) System.currentTimeMillis(); } @Override diff --git a/app/src/main/java/ar/rulosoft/mimanganu/ReaderFragment.java b/app/src/main/java/ar/rulosoft/mimanganu/ReaderFragment.java index 117aa796..9d491b8c 100644 --- a/app/src/main/java/ar/rulosoft/mimanganu/ReaderFragment.java +++ b/app/src/main/java/ar/rulosoft/mimanganu/ReaderFragment.java @@ -776,7 +776,10 @@ protected Chapter doInBackground(Chapter... arg0) { Chapter c = arg0[0]; ServerBase s = ServerBase.getServer(ReaderFragment.this.mManga.getServerId(), getContext()); try { - if (c.getPages() < 1) s.chapterInit(c); + if (c.getPages() < 1) { + s.chapterInit(c); + Database.updateChapter(getContext(), c); + } } catch (Exception e) { if (e.getMessage() != null) error = e.getMessage();