diff --git a/app/src/main/java/com/gh/common/util/DownloadNotificationHelper.kt b/app/src/main/java/com/gh/common/util/DownloadNotificationHelper.kt index 1b96193a37..d65df53a35 100644 --- a/app/src/main/java/com/gh/common/util/DownloadNotificationHelper.kt +++ b/app/src/main/java/com/gh/common/util/DownloadNotificationHelper.kt @@ -58,11 +58,13 @@ object DownloadNotificationHelper { notificationManager.createNotificationChannel(channel) } + val whenTime = 1000 * 60 * (System.currentTimeMillis() / 1000 / 60) val builder = NotificationCompat.Builder(HaloApp.getInstance().application, DOWNLOAD_CHANNEL_ID) .setContentTitle(entity.name) .setSmallIcon(R.mipmap.logo) .setContentIntent(pendingIntent) .setGroup(DOWNLOAD_GROUP_KEY) + .setWhen(whenTime) .setProgress(PROGRESS_MAX, entity.percent.toInt(), false) when (entity.status) { @@ -104,7 +106,7 @@ object DownloadNotificationHelper { } else { val time = mNotifyMap[entity.path] val curTime = System.currentTimeMillis() - if (time == null || curTime - time > 1500) { + if (time == null || curTime - time > 2000) { mNotifyMap[entity.path] = curTime notificationManager.notify(entity.path, DOWNLOAD_NOTIFICATION_ID, notification) }