From a32c1b5eb20d252b74fe0a4120215734a84e79d8 Mon Sep 17 00:00:00 2001 From: inorichi Date: Sat, 19 Dec 2015 20:25:49 +0100 Subject: [PATCH] Fix MAL autoupdate function. --- .../eu/kanade/mangafeed/data/sync/UpdateMangaSyncService.java | 2 +- .../test/java/eu/kanade/mangafeed/ChapterRecognitionTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/mangafeed/data/sync/UpdateMangaSyncService.java b/app/src/main/java/eu/kanade/mangafeed/data/sync/UpdateMangaSyncService.java index cd0f6dacc..4733ee429 100644 --- a/app/src/main/java/eu/kanade/mangafeed/data/sync/UpdateMangaSyncService.java +++ b/app/src/main/java/eu/kanade/mangafeed/data/sync/UpdateMangaSyncService.java @@ -60,7 +60,7 @@ public class UpdateMangaSyncService extends Service { private void updateLastChapterRead(MangaSync mangaSync, int startId) { MangaSyncService sync = syncManager.getSyncService(mangaSync.sync_id); - subscriptions.add(Observable.fromCallable(() -> sync.update(mangaSync)) + subscriptions.add(Observable.defer(() -> sync.update(mangaSync)) .flatMap(response -> db.insertMangaSync(mangaSync).createObservable()) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) diff --git a/app/src/test/java/eu/kanade/mangafeed/ChapterRecognitionTest.java b/app/src/test/java/eu/kanade/mangafeed/ChapterRecognitionTest.java index d6b0fe1e3..43782e2bc 100644 --- a/app/src/test/java/eu/kanade/mangafeed/ChapterRecognitionTest.java +++ b/app/src/test/java/eu/kanade/mangafeed/ChapterRecognitionTest.java @@ -115,7 +115,7 @@ public class ChapterRecognitionTest { @Test public void testWithVersionBefore() { - // It should be 84, not 2084) + // It should be 84, not 2084 Chapter c = createChapter("Onepunch-Man Punch Ver002 084 : Creeping Darkness"); ChapterRecognition.parseChapterNumber(c, randomManga); assertThat(c.chapter_number, is(84f));