mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-15 15:02:49 +01:00
chore: Ktlint
This commit is contained in:
parent
7d97e9c9d4
commit
9bf1b37331
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
@ -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>())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user