mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:31:27 +00:00
isDM in Notifications (#1254)
* isDm * isDm added and some code improvements * Bump SDK and fix one name. * changelog --------- Co-authored-by: Mauro Romito <mauro.romito@element.io>
This commit is contained in:
@@ -112,15 +112,15 @@ extension UNMutableNotificationContent {
|
||||
var fetchedImage: INImage?
|
||||
let image: INImage
|
||||
if let mediaSource = icon.mediaSource {
|
||||
if let mediaProvider {
|
||||
switch await mediaProvider.loadImageDataFromSource(mediaSource) {
|
||||
case .success(let data):
|
||||
fetchedImage = INImage(imageData: data)
|
||||
case .failure(let error):
|
||||
MXLog.error("Couldn't add sender icon: \(error)")
|
||||
// ...The provider failed to fetch
|
||||
needsPlaceholder = true
|
||||
}
|
||||
switch await mediaProvider?.loadImageDataFromSource(mediaSource) {
|
||||
case .success(let data):
|
||||
fetchedImage = INImage(imageData: data)
|
||||
case .failure(let error):
|
||||
MXLog.error("Couldn't add sender icon: \(error)")
|
||||
// ...The provider failed to fetch
|
||||
needsPlaceholder = true
|
||||
case .none:
|
||||
break
|
||||
}
|
||||
} else {
|
||||
// ...There is no media
|
||||
|
||||
Reference in New Issue
Block a user