@@ -22,6 +22,7 @@ import com.looker.core.common.extension.getColorFromAttr
22
22
import com.looker.core.common.extension.notificationManager
23
23
import com.looker.core.common.extension.startSelf
24
24
import com.looker.core.common.extension.stopForegroundCompat
25
+ import com.looker.core.common.log
25
26
import com.looker.core.common.result.Result
26
27
import com.looker.core.common.sdkAbove
27
28
import com.looker.core.datastore.SettingsRepository
@@ -471,7 +472,7 @@ class SyncService : ConnectionService<SyncService.Binder>() {
471
472
autoUpdate : Boolean
472
473
) {
473
474
try {
474
- if (! hasUpdates || ! notifyUpdates ) {
475
+ if (! hasUpdates) {
475
476
syncState.emit(State .Finish )
476
477
val needStop = started == Started .MANUAL
477
478
started = Started .NO
@@ -481,10 +482,14 @@ class SyncService : ConnectionService<SyncService.Binder>() {
481
482
val blocked = updateNotificationBlockerFragment?.get()?.isAdded == true
482
483
val updates = Database .ProductAdapter .getUpdates()
483
484
if (! blocked && updates.isNotEmpty()) {
484
- displayUpdatesNotification(updates)
485
+ if (notifyUpdates) displayUpdatesNotification(updates)
485
486
if (autoUpdate) updateAllAppsInternal()
486
487
}
487
- handleUpdates(hasUpdates = false , notifyUpdates = true , autoUpdate = autoUpdate)
488
+ handleUpdates(
489
+ hasUpdates = false ,
490
+ notifyUpdates = notifyUpdates,
491
+ autoUpdate = autoUpdate
492
+ )
488
493
} finally {
489
494
withContext(NonCancellable ) {
490
495
lock.withLock { currentTask = null }
@@ -494,6 +499,7 @@ class SyncService : ConnectionService<SyncService.Binder>() {
494
499
}
495
500
496
501
private suspend fun updateAllAppsInternal () {
502
+ log(" Check Running" , " Syncing" )
497
503
Database .ProductAdapter
498
504
.getUpdates()
499
505
// Update Droid-ify the last
0 commit comments