From 3fe7642aea40fff2d188c9624712a63c48c40d04 Mon Sep 17 00:00:00 2001 From: Roshan Varughese <40583749+Animeboynz@users.noreply.github.com> Date: Fri, 25 Oct 2024 21:24:50 +1300 Subject: [PATCH] Spotless --- .../eu/kanade/domain/track/service/TrackPreferences.kt | 5 ++++- .../java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/domain/track/service/TrackPreferences.kt b/app/src/main/java/eu/kanade/domain/track/service/TrackPreferences.kt index e5ddad649..d07bc715d 100644 --- a/app/src/main/java/eu/kanade/domain/track/service/TrackPreferences.kt +++ b/app/src/main/java/eu/kanade/domain/track/service/TrackPreferences.kt @@ -38,5 +38,8 @@ class TrackPreferences( fun autoUpdateTrack() = preferenceStore.getBoolean("pref_auto_update_manga_sync_key", true) - fun autoUpdateTrackOnMarkRead() = preferenceStore.getEnum("pref_auto_update_manga_on_mark_read", AutoTrackState.ALWAYS) + fun autoUpdateTrackOnMarkRead() = preferenceStore.getEnum( + "pref_auto_update_manga_on_mark_read", + AutoTrackState.ALWAYS, + ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt index 8a7264a9d..f58f7cfd2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt @@ -736,7 +736,12 @@ class MangaScreenModel( chapters = chapters.toTypedArray(), ) - if (!read || successState?.hasLoggedInTrackers == false || autoTrackState == AutoTrackState.NEVER) return@launchIO + if (!read || + successState?.hasLoggedInTrackers == false || + autoTrackState == AutoTrackState.NEVER + ) { + return@launchIO + } val tracks = getTracks.await(mangaId) val maxChapterNumber = chapters.maxOf { it.chapterNumber }