mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
drop iOS 17 and removed all #available and #unavaible checks for 17 and 18
This commit is contained in:
@@ -21,25 +21,19 @@ struct TimelineItemMacContextMenu: View {
|
||||
if let menuActions = actionProvider.makeActions() {
|
||||
Section {
|
||||
if !menuActions.reactions.isEmpty {
|
||||
if #available(iOS 17.0, *) {
|
||||
let reactions = (item as? EventBasedTimelineItemProtocol)?.properties.reactions ?? []
|
||||
ControlGroup {
|
||||
ForEach(menuActions.reactions, id: \.key) {
|
||||
ReactionToggle(reaction: $0, reactions: reactions) {
|
||||
send(.toggleReaction(key: $0))
|
||||
}
|
||||
}
|
||||
|
||||
Button { send(.react) } label: {
|
||||
CompoundIcon(\.reactionAdd)
|
||||
let reactions = (item as? EventBasedTimelineItemProtocol)?.properties.reactions ?? []
|
||||
ControlGroup {
|
||||
ForEach(menuActions.reactions, id: \.key) {
|
||||
ReactionToggle(reaction: $0, reactions: reactions) {
|
||||
send(.toggleReaction(key: $0))
|
||||
}
|
||||
}
|
||||
.controlGroupStyle(.palette)
|
||||
} else {
|
||||
|
||||
Button { send(.react) } label: {
|
||||
TimelineItemMenuAction.react.label
|
||||
CompoundIcon(\.reactionAdd)
|
||||
}
|
||||
}
|
||||
.controlGroupStyle(.palette)
|
||||
}
|
||||
|
||||
ForEach(menuActions.actions) { action in
|
||||
|
||||
@@ -53,7 +53,7 @@ struct TimelineItemMenu: View {
|
||||
}
|
||||
}
|
||||
.accessibilityIdentifier(A11yIdentifiers.roomScreen.timelineItemActionMenu)
|
||||
.backportPresentationSizingPage()
|
||||
.presentationSizing(.page)
|
||||
.presentationDetents([.medium, .large])
|
||||
.presentationBackground(Color.compound.bgCanvasDefault)
|
||||
.presentationDragIndicator(.visible)
|
||||
|
||||
Reference in New Issue
Block a user