mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Audio Timeline Item support (#612)
* audio timeline item support * improved the code to reduce cognitive complexity * no need anymore for this swiftlint disabling of a rule * pr comments
This commit is contained in:
@@ -117,6 +117,11 @@ extension NotificationItemProxy {
|
||||
senderId: senderId,
|
||||
roomId: roomId,
|
||||
mediaProvider: mediaProvider)
|
||||
case .audio(content: let content):
|
||||
return try await processAudio(content: content,
|
||||
senderId: senderId,
|
||||
roomId: roomId,
|
||||
mediaProvider: mediaProvider)
|
||||
case .none:
|
||||
return nil
|
||||
}
|
||||
@@ -222,4 +227,16 @@ extension NotificationItemProxy {
|
||||
|
||||
return notification
|
||||
}
|
||||
|
||||
private func processAudio(content: AudioMessageContent,
|
||||
senderId: String,
|
||||
roomId: String,
|
||||
mediaProvider: MediaProviderProtocol?) async throws -> UNMutableNotificationContent {
|
||||
let notification = try await processCommon(senderId: senderId,
|
||||
roomId: roomId,
|
||||
mediaProvider: mediaProvider)
|
||||
notification.body = "🔊 " + content.body
|
||||
|
||||
return notification
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user