Removing dead code part 3 (#2264)

This commit is contained in:
Mauro
2023-12-19 12:12:16 +01:00
committed by GitHub
parent 334d55aeaf
commit 09fb5461e6
77 changed files with 48 additions and 462 deletions
@@ -34,10 +34,6 @@ final class RoomTimelineItemViewState: Identifiable, Equatable, ObservableObject
identifier.timelineID
}
var isReactable: Bool {
type.isReactable
}
init(type: RoomTimelineItemType, groupStyle: TimelineGroupStyle) {
self.type = type
self.groupStyle = groupStyle
@@ -146,18 +142,4 @@ enum RoomTimelineItemType: Equatable {
return item.id
}
}
/// Whether or not it is possible to send a reaction to this timeline item.
var isReactable: Bool {
switch self {
case .text, .image, .video, .audio, .file, .emote, .notice, .sticker, .location, .poll, .voice:
return true
case .redacted, .encrypted, .unsupported, .state: // Event based items that aren't reactable
return false
case .timelineStart, .encryptedHistory, .separator, .readMarker, .paginationIndicator: // Virtual items are never reactable
return false
case .group:
return false
}
}
}