Commit c89d55f4 authored by wanglei's avatar wanglei

...

parent 15a6be7c
Pipeline #1395 canceled with stages
......@@ -283,14 +283,16 @@ object NotificationUtils {
private var currentNotificationIdIndex = -1
private val nextNotificationId: String
get() {
// 将当前通知 ID 索引加 1
currentNotificationIdIndex++
// 如果当前通知 ID 索引超出列表范围,则将其重置为 0
if (currentNotificationIdIndex >= NOTIFICATION_IDS.size) {
currentNotificationIdIndex = 0
}
// 返回下一个通知 ID
return NOTIFICATION_IDS[currentNotificationIdIndex]
// // 将当前通知 ID 索引加 1
// currentNotificationIdIndex++
// // 如果当前通知 ID 索引超出列表范围,则将其重置为 0
// if (currentNotificationIdIndex >= NOTIFICATION_IDS.size) {
// currentNotificationIdIndex = 0
// }
// // 返回下一个通知 ID
// return NOTIFICATION_IDS[currentNotificationIdIndex]
return NOTIFICATION_IDS.random()
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment