From 9bf1b37331c3e364145b31917ff7f2106cf9bb9c Mon Sep 17 00:00:00 2001 From: KaiserBh Date: Thu, 18 Jan 2024 15:50:13 +1100 Subject: [PATCH] chore: Ktlint --- app/src/main/java/eu/kanade/tachiyomi/App.kt | 8 ++++++-- .../eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt | 4 +++- .../java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt | 3 ++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/App.kt b/app/src/main/java/eu/kanade/tachiyomi/App.kt index e6da79884..ef9659d1a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/App.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/App.kt @@ -134,7 +134,9 @@ class App : Application(), DefaultLifecycleObserver, ImageLoaderFactory { val syncPreferences: SyncPreferences by injectLazy() val syncFlags = syncPreferences.syncFlags().get() - if (syncPreferences.isSyncEnabled() && syncFlags and SyncPreferences.Flags.SYNC_ON_APP_START == SyncPreferences.Flags.SYNC_ON_APP_START) { + if (syncPreferences.isSyncEnabled() && syncFlags and + SyncPreferences.Flags.SYNC_ON_APP_START == SyncPreferences.Flags.SYNC_ON_APP_START + ) { SyncDataJob.startNow(this@App) } } @@ -173,7 +175,9 @@ class App : Application(), DefaultLifecycleObserver, ImageLoaderFactory { val syncPreferences: SyncPreferences by injectLazy() val syncFlags = syncPreferences.syncFlags().get() - if (syncPreferences.isSyncEnabled() && syncFlags and SyncPreferences.Flags.SYNC_ON_APP_RESUME == SyncPreferences.Flags.SYNC_ON_APP_RESUME) { + if (syncPreferences.isSyncEnabled() && syncFlags + and SyncPreferences.Flags.SYNC_ON_APP_RESUME == SyncPreferences.Flags.SYNC_ON_APP_RESUME + ) { SyncDataJob.startNow(this@App) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt index 72cfa8e2d..3b85d03ee 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt @@ -480,7 +480,9 @@ class LibraryUpdateJob(private val context: Context, workerParams: WorkerParamet val syncPreferences: SyncPreferences = Injekt.get() // Only proceed with SyncDataJob if sync is enabled and the specific sync on library update flag is set - if (syncPreferences.isSyncEnabled() && syncPreferences.syncFlags().get() and SyncPreferences.Flags.SYNC_ON_LIBRARY_UPDATE == SyncPreferences.Flags.SYNC_ON_LIBRARY_UPDATE) { + if (syncPreferences.isSyncEnabled() && syncPreferences.syncFlags().get() and + SyncPreferences.Flags.SYNC_ON_LIBRARY_UPDATE == SyncPreferences.Flags.SYNC_ON_LIBRARY_UPDATE + ) { // Check if SyncDataJob is already running if (wm.isRunning(SyncDataJob.TAG_MANUAL)) { // SyncDataJob is already running diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt index 9fcead270..8170c5310 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt @@ -537,7 +537,8 @@ class ReaderViewModel @JvmOverloads constructor( // Check if syncing is enabled for chapter read: if (syncPreferences.isSyncEnabled() && - syncFlags and SyncPreferences.Flags.SYNC_ON_CHAPTER_READ == SyncPreferences.Flags.SYNC_ON_CHAPTER_READ + syncFlags and + SyncPreferences.Flags.SYNC_ON_CHAPTER_READ == SyncPreferences.Flags.SYNC_ON_CHAPTER_READ ) { SyncDataJob.startNow(Injekt.get()) }