mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Swift 6 migration for NSE (#5608)
* swift 6 support for NSE and concurrency safe implementations for it * enforcing required Sendable conformance for swift 6 migration in NSE * use Mutex to access the string builder cache * use an async stream to update timeline items diffs * fix for Sendable appHooks
This commit is contained in:
@@ -250,8 +250,8 @@ struct NotificationContentBuilder {
|
||||
|
||||
if let fetchedImage {
|
||||
image = fetchedImage
|
||||
} else if let data = await getPlaceholderAvatarImageData(name: icon.groupInfo?.avatarDisplayName ?? senderAvatarDisplayName,
|
||||
id: icon.groupInfo?.id ?? senderID) {
|
||||
} else if let data = await Self.getPlaceholderAvatarImageData(name: icon.groupInfo?.avatarDisplayName ?? senderAvatarDisplayName,
|
||||
id: icon.groupInfo?.id ?? senderID) {
|
||||
image = INImage(imageData: data)
|
||||
} else {
|
||||
image = INImage(named: "")
|
||||
@@ -309,7 +309,7 @@ struct NotificationContentBuilder {
|
||||
}
|
||||
|
||||
@MainActor
|
||||
func getPlaceholderAvatarImageData(name: String, id: String) async -> Data? {
|
||||
static func getPlaceholderAvatarImageData(name: String, id: String) async -> Data? {
|
||||
// The version value is used in case the design of the placeholder is updated to force a replacement
|
||||
let prefix = "notification_placeholderV9"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user