chore: Ktlint

This commit is contained in:
KaiserBh 2024-01-18 15:50:13 +11:00
parent 7d97e9c9d4
commit 9bf1b37331
3 changed files with 11 additions and 4 deletions

View File

@ -134,7 +134,9 @@ class App : Application(), DefaultLifecycleObserver, ImageLoaderFactory {
val syncPreferences: SyncPreferences by injectLazy() val syncPreferences: SyncPreferences by injectLazy()
val syncFlags = syncPreferences.syncFlags().get() 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) SyncDataJob.startNow(this@App)
} }
} }
@ -173,7 +175,9 @@ class App : Application(), DefaultLifecycleObserver, ImageLoaderFactory {
val syncPreferences: SyncPreferences by injectLazy() val syncPreferences: SyncPreferences by injectLazy()
val syncFlags = syncPreferences.syncFlags().get() 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) SyncDataJob.startNow(this@App)
} }
} }

View File

@ -480,7 +480,9 @@ class LibraryUpdateJob(private val context: Context, workerParams: WorkerParamet
val syncPreferences: SyncPreferences = Injekt.get() val syncPreferences: SyncPreferences = Injekt.get()
// Only proceed with SyncDataJob if sync is enabled and the specific sync on library update flag is set // 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 // Check if SyncDataJob is already running
if (wm.isRunning(SyncDataJob.TAG_MANUAL)) { if (wm.isRunning(SyncDataJob.TAG_MANUAL)) {
// SyncDataJob is already running // SyncDataJob is already running

View File

@ -537,7 +537,8 @@ class ReaderViewModel @JvmOverloads constructor(
// Check if syncing is enabled for chapter read: // Check if syncing is enabled for chapter read:
if (syncPreferences.isSyncEnabled() && 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<Application>()) SyncDataJob.startNow(Injekt.get<Application>())
} }