Skip to content

Commit dd33ada

Browse files
author
Chenhe
committed
修复头像保存失败
1 parent e503abb commit dd33ada

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/src/main/java/cc/chenhe/qqnotifyevo/core/NotificationProcessor.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package cc.chenhe.qqnotifyevo.core
22

3+
import android.annotation.SuppressLint
34
import android.app.Notification
45
import android.app.PendingIntent
56
import android.content.Context
@@ -386,7 +387,7 @@ abstract class NotificationProcessor(context: Context) {
386387
} else {
387388
// 与我相关的动态
388389
getNotifyLargeIcon(context, original)?.also {
389-
avatarManager.saveAvatar(CONVERSATION_NAME_QZONE_SPECIAL.hashCode(), it)
390+
avatarManager.saveAvatar(CONVERSATION_NAME_QZONE.hashCode(), it)
390391
}
391392
conversation = addMessage(
392393
tag,
@@ -421,7 +422,7 @@ abstract class NotificationProcessor(context: Context) {
421422

422423
if (!isMulti)
423424
getNotifyLargeIcon(context, original)?.also {
424-
avatarManager.saveAvatar(CONVERSATION_NAME_QZONE_SPECIAL.hashCode(), it)
425+
avatarManager.saveAvatar(groupName.hashCode(), it)
425426
}
426427
val conversation = addMessage(
427428
tag, name, text, groupName, avatarManager.getAvatar(name.hashCode()),
@@ -452,7 +453,7 @@ abstract class NotificationProcessor(context: Context) {
452453
val text = matcher.group(2) ?: return null
453454
if (!isMulti)
454455
getNotifyLargeIcon(context, original)?.also {
455-
avatarManager.saveAvatar(CONVERSATION_NAME_QZONE_SPECIAL.hashCode(), it)
456+
avatarManager.saveAvatar(name.hashCode(), it)
456457
}
457458
val conversation = addMessage(
458459
tag, name, text, null, avatarManager.getAvatar(name.hashCode()),
@@ -653,6 +654,7 @@ abstract class NotificationProcessor(context: Context) {
653654
* @param tag 来源标记。
654655
* @param original 原始通知。
655656
*/
657+
@SuppressLint("BinaryOperationInTimber")
656658
protected fun createConversationNotification(
657659
context: Context, tag: Tag, channel: NotifyChannel,
658660
conversation: Conversation, original: Notification

0 commit comments

Comments
 (0)