From 7bd24c78c68c0f2a1f9dba3c8cb188f56720693a Mon Sep 17 00:00:00 2001 From: acclorite Date: Fri, 21 Jun 2024 13:41:26 +0300 Subject: [PATCH] =?UTF-8?q?Updates=20Notifications:=20Replaced=20action=20?= =?UTF-8?q?Details=20=E2=86=92=20Download(now=20by=20clicking=20the=20noti?= =?UTF-8?q?fication=20user=20goes=20to=20the=20release=20page=20instead=20?= =?UTF-8?q?of=20direct=20download).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../notification/UpdatesNotificationServiceImpl.kt | 11 +++++++---- app/src/main/res/values-uk/strings.xml | 4 ++-- app/src/main/res/values/strings.xml | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/ua/acclorite/book_story/data/local/notification/UpdatesNotificationServiceImpl.kt b/app/src/main/java/ua/acclorite/book_story/data/local/notification/UpdatesNotificationServiceImpl.kt index 985daeb6..bdc16737 100644 --- a/app/src/main/java/ua/acclorite/book_story/data/local/notification/UpdatesNotificationServiceImpl.kt +++ b/app/src/main/java/ua/acclorite/book_story/data/local/notification/UpdatesNotificationServiceImpl.kt @@ -6,6 +6,7 @@ import android.app.NotificationManager import android.app.PendingIntent import android.content.Context import android.content.Intent +import android.graphics.drawable.Icon import android.net.Uri import ua.acclorite.book_story.R import ua.acclorite.book_story.data.remote.dto.LatestReleaseInfo @@ -53,11 +54,13 @@ class UpdatesNotificationServiceImpl @Inject constructor( releaseInfo.name ) ) - .setContentIntent(downloadLatestVersionPendingIntent) + .setContentIntent(latestReleasePendingIntent) .addAction( - R.drawable.app_icon_monochrome, - application.getString(R.string.updates_notification_action), - latestReleasePendingIntent + Notification.Action.Builder( + Icon.createWithResource(application, R.drawable.app_icon_monochrome), + application.getString(R.string.updates_notification_action), + downloadLatestVersionPendingIntent + ).build() ) .build() diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 1e8d7cc2..ed8ccd7e 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -13,10 +13,10 @@ Нове оновлення Історії Книги! Оновлення %1$s вийшло! - Натиснувши на це сповіщення, ви завантажете останню версію застосунку. + Натисніть, щоб перейти на сторінку релізу. - Подробиці + Завантажити diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0a3a134f..c9684d85 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -32,10 +32,10 @@ New update of Book\'s Story! Update %1$s just released! - By clicking this notification you will download the latest version of the app. + Click to go to the release page. - Details + Download