Skip to content

Commit 34f2fd4

Browse files
author
neko
committed
Update
1 parent fb0a8a1 commit 34f2fd4

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

app/src/main/java/com/adb/kitty/compose/AdbSessionService.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ class AdbSessionService : Service() {
167167
startForeground(NOTIFICATION_ID, buildNotification(initialText))
168168
}
169169

170-
// 2. 开启 3 秒高频静默刷新定时器
171170
startNotificationTicker()
172171
}
173172

@@ -201,8 +200,8 @@ class AdbSessionService : Service() {
201200
refreshJob = serviceScope.launch {
202201
while (isActive) {
203202
updateTickerNotification()
204-
delay(3000)
205-
totalSeconds += 3
203+
delay(7000)
204+
totalSeconds += 7
206205
}
207206
}
208207
}
@@ -213,7 +212,6 @@ class AdbSessionService : Service() {
213212
val seconds = totalSeconds % 60
214213
val timeString = String.format(Locale.US, "%02d:%02d:%02d", hours, minutes, seconds)
215214

216-
// ✨ 核心修正 2:定时器只负责安心传递时间字符串,不再负责用“|”野蛮拼接
217215
updateNotification(timeString)
218216
}
219217

@@ -291,7 +289,8 @@ class AdbSessionService : Service() {
291289
.setIcon(avatarIcon)
292290
.setIntent(Intent(this, AdbSessionService::class.java).apply { action = "LAUNCH_FROM_NOTIF" })
293291
.setPerson(consoleUser)
294-
.setLongLived(true)
292+
.setLongLived(true)
293+
.setIsConversation()
295294
.build()
296295

297296
ShortcutManagerCompat.pushDynamicShortcut(this, shortcut)
@@ -315,6 +314,7 @@ class AdbSessionService : Service() {
315314
.setSmallIcon(R.drawable.ic_small_kiss)
316315
.setStyle(messagingStyle)
317316
.setShortcutId(shortcutId)
317+
.setBubbleMetadata(null)
318318
.setCategory(NotificationCompat.CATEGORY_MESSAGE)
319319
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
320320
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)

0 commit comments

Comments
 (0)