mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Refactor the NSE so that the original notification content is preserved between all the different processing steps
- building brand new content is probably interfering with how iOS syncs up delivered and seen notifications between devices - simplify all the various steps and make the flows easier to follow
This commit is contained in:
committed by
Stefan Ceriu
parent
7cf1d08b20
commit
5ad25d8492
@@ -41,32 +41,4 @@ extension NotificationItemProxyProtocol {
|
||||
var isDM: Bool {
|
||||
isRoomDirect && roomJoinedMembers <= 2
|
||||
}
|
||||
|
||||
var hasMedia: Bool {
|
||||
if (isDM && senderAvatarMediaSource != nil) ||
|
||||
(!isDM && roomAvatarMediaSource != nil) {
|
||||
return true
|
||||
}
|
||||
switch event {
|
||||
case .invite, .none:
|
||||
return false
|
||||
case .timeline(let event):
|
||||
switch try? event.eventType() {
|
||||
case .state, .none:
|
||||
return false
|
||||
case let .messageLike(content):
|
||||
switch content {
|
||||
case let .roomMessage(messageType, _):
|
||||
switch messageType {
|
||||
case .image, .video, .audio:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user