From d9e7b352fd3626e60dee6afac5696ab588237411 Mon Sep 17 00:00:00 2001 From: SayantanRC Date: Thu, 5 May 2022 05:45:07 +0530 Subject: [PATCH] App lounge: (issue_5376) Read shouldShowNotification before showing update notification. --- .../foundation/e/apps/updates/manager/UpdatesWorker.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/foundation/e/apps/updates/manager/UpdatesWorker.kt b/app/src/main/java/foundation/e/apps/updates/manager/UpdatesWorker.kt index 2aa21aa8a..37b16ea44 100644 --- a/app/src/main/java/foundation/e/apps/updates/manager/UpdatesWorker.kt +++ b/app/src/main/java/foundation/e/apps/updates/manager/UpdatesWorker.kt @@ -62,7 +62,13 @@ class UpdatesWorker @AssistedInject constructor( val appsNeededToUpdate = updatesManagerRepository.getUpdates(authData) .filter { !(!it.isFree && authData.isAnonymous) } val isConnectedToUnmeteredNetwork = isConnectedToUnmeteredNetwork(applicationContext) - handleNotification(appsNeededToUpdate, isConnectedToUnmeteredNetwork) + /* + * Show notification only if enabled. + * Issue: https://gitlab.e.foundation/e/backlog/-/issues/5376 + */ + if (shouldShowNotification) { + handleNotification(appsNeededToUpdate, isConnectedToUnmeteredNetwork) + } triggerUpdateProcessOnSettings( isConnectedToUnmeteredNetwork, appsNeededToUpdate, -- GitLab