Skip to content

Commit

Permalink
修复头像保存失败
Browse files Browse the repository at this point in the history
  • Loading branch information
Chenhe committed Sep 22, 2021
1 parent e503abb commit dd33ada
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package cc.chenhe.qqnotifyevo.core

import android.annotation.SuppressLint
import android.app.Notification
import android.app.PendingIntent
import android.content.Context
Expand Down Expand Up @@ -386,7 +387,7 @@ abstract class NotificationProcessor(context: Context) {
} else {
// 与我相关的动态
getNotifyLargeIcon(context, original)?.also {
avatarManager.saveAvatar(CONVERSATION_NAME_QZONE_SPECIAL.hashCode(), it)
avatarManager.saveAvatar(CONVERSATION_NAME_QZONE.hashCode(), it)
}
conversation = addMessage(
tag,
Expand Down Expand Up @@ -421,7 +422,7 @@ abstract class NotificationProcessor(context: Context) {

if (!isMulti)
getNotifyLargeIcon(context, original)?.also {
avatarManager.saveAvatar(CONVERSATION_NAME_QZONE_SPECIAL.hashCode(), it)
avatarManager.saveAvatar(groupName.hashCode(), it)
}
val conversation = addMessage(
tag, name, text, groupName, avatarManager.getAvatar(name.hashCode()),
Expand Down Expand Up @@ -452,7 +453,7 @@ abstract class NotificationProcessor(context: Context) {
val text = matcher.group(2) ?: return null
if (!isMulti)
getNotifyLargeIcon(context, original)?.also {
avatarManager.saveAvatar(CONVERSATION_NAME_QZONE_SPECIAL.hashCode(), it)
avatarManager.saveAvatar(name.hashCode(), it)
}
val conversation = addMessage(
tag, name, text, null, avatarManager.getAvatar(name.hashCode()),
Expand Down Expand Up @@ -653,6 +654,7 @@ abstract class NotificationProcessor(context: Context) {
* @param tag 来源标记。
* @param original 原始通知。
*/
@SuppressLint("BinaryOperationInTimber")
protected fun createConversationNotification(
context: Context, tag: Tag, channel: NotifyChannel,
conversation: Conversation, original: Notification
Expand Down

0 comments on commit dd33ada

Please sign in to comment.