diff --git a/app/src/main/java/com/example/research/common/progress/DictionaryProgressPresenter.kt b/app/src/main/java/com/example/research/common/progress/DictionaryProgressPresenter.kt index c67be10..ae7f925 100644 --- a/app/src/main/java/com/example/research/common/progress/DictionaryProgressPresenter.kt +++ b/app/src/main/java/com/example/research/common/progress/DictionaryProgressPresenter.kt @@ -32,6 +32,7 @@ class DictionaryProgressPresenter( fun beginFlow() { terminalActive = false + notifications.cancelTerminalNotification() } override fun showImportSuccess() { diff --git a/app/src/main/java/com/example/research/common/progress/NotificationPort.kt b/app/src/main/java/com/example/research/common/progress/NotificationPort.kt index e2c5a3e..0e51c65 100644 --- a/app/src/main/java/com/example/research/common/progress/NotificationPort.kt +++ b/app/src/main/java/com/example/research/common/progress/NotificationPort.kt @@ -6,5 +6,6 @@ interface NotificationPort { fun showDownloadSuccess() fun showError() fun cancelProgressNotification() + fun cancelTerminalNotification() fun hasActiveProgressNotification(): Boolean } diff --git a/app/src/main/java/com/example/research/common/util/NotificationHelper.kt b/app/src/main/java/com/example/research/common/util/NotificationHelper.kt index 433d03a..e5eb937 100644 --- a/app/src/main/java/com/example/research/common/util/NotificationHelper.kt +++ b/app/src/main/java/com/example/research/common/util/NotificationHelper.kt @@ -111,6 +111,10 @@ class NotificationHelper(private val context: Context) : NotificationPort { notificationManager.cancel(NOTIFICATION_ID) } + override fun cancelTerminalNotification() { + notificationManager.cancel(TERMINAL_NOTIFICATION_ID) + } + override fun hasActiveProgressNotification(): Boolean = lastNotificationKey != 0 fun showUnifiedProgressNotification(