mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Fix for the sender icon not being rendered in notifications sometimes (#862)
* fix for the sender icon not being rendered sometimes in notifications * removing a line * removing the environment every time we run a zsh command * removed unused parameters that we already have stored in the notification * changelog
This commit is contained in:
@@ -232,22 +232,17 @@ extension NotificationItemProxyProtocol {
|
||||
notification.sound = isNoisy ? UNNotificationSound(named: UNNotificationSoundName(rawValue: "message.caf")) : nil
|
||||
|
||||
let senderName = senderDisplayName ?? roomDisplayName
|
||||
var groupName: String?
|
||||
var mediaSource: MediaSourceProxy?
|
||||
let iconType: NotificationIconType
|
||||
if !isDirect {
|
||||
groupName = senderName != roomDisplayName ? roomDisplayName : nil
|
||||
mediaSource = roomAvatarMediaSource
|
||||
iconType = .group(mediaSource: roomAvatarMediaSource, groupName: roomDisplayName)
|
||||
} else {
|
||||
mediaSource = senderAvatarMediaSource
|
||||
iconType = .sender(mediaSource: senderAvatarMediaSource)
|
||||
}
|
||||
|
||||
notification = try await notification.addSenderIcon(using: mediaProvider,
|
||||
senderId: event.senderID,
|
||||
receiverId: receiverID,
|
||||
senderID: event.senderID,
|
||||
senderName: senderName,
|
||||
groupName: groupName,
|
||||
mediaSource: mediaSource,
|
||||
roomId: roomID)
|
||||
iconType: iconType)
|
||||
return notification
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user