Fixes #2790 - Reorder available composer menu actions

This commit is contained in:
Stefan Ceriu
2024-05-07 17:04:25 +03:00
committed by Stefan Ceriu
parent bd4fae6086
commit a08b4842d1
6 changed files with 38 additions and 37 deletions
@@ -37,13 +37,31 @@ struct RoomAttachmentPicker: View {
var menuContent: some View {
VStack(alignment: .leading, spacing: 0.0) {
if ServiceLocator.shared.settings.richTextEditorEnabled {
Button {
context.send(viewAction: .enableTextFormatting)
} label: {
Label(L10n.screenRoomAttachmentTextFormatting, icon: \.textFormatting)
.labelStyle(.menuSheet)
}
.accessibilityIdentifier(A11yIdentifiers.roomScreen.attachmentPickerTextFormatting)
}
Button {
context.send(viewAction: .attach(.photoLibrary))
context.send(viewAction: .attach(.poll))
} label: {
Label(L10n.screenRoomAttachmentSourceGallery, icon: \.image)
Label(L10n.screenRoomAttachmentSourcePoll, icon: \.polls)
.labelStyle(.menuSheet)
}
.accessibilityIdentifier(A11yIdentifiers.roomScreen.attachmentPickerPhotoLibrary)
.accessibilityIdentifier(A11yIdentifiers.roomScreen.attachmentPickerPoll)
Button {
context.send(viewAction: .attach(.location))
} label: {
Label(L10n.screenRoomAttachmentSourceLocation, icon: \.locationPin)
.labelStyle(.menuSheet)
}
.accessibilityIdentifier(A11yIdentifiers.roomScreen.attachmentPickerLocation)
Button {
context.send(viewAction: .attach(.file))
@@ -53,6 +71,14 @@ struct RoomAttachmentPicker: View {
}
.accessibilityIdentifier(A11yIdentifiers.roomScreen.attachmentPickerDocuments)
Button {
context.send(viewAction: .attach(.photoLibrary))
} label: {
Label(L10n.screenRoomAttachmentSourceGallery, icon: \.image)
.labelStyle(.menuSheet)
}
.accessibilityIdentifier(A11yIdentifiers.roomScreen.attachmentPickerPhotoLibrary)
Button {
context.send(viewAction: .attach(.camera))
} label: {
@@ -60,32 +86,6 @@ struct RoomAttachmentPicker: View {
.labelStyle(.menuSheet)
}
.accessibilityIdentifier(A11yIdentifiers.roomScreen.attachmentPickerCamera)
Button {
context.send(viewAction: .attach(.location))
} label: {
Label(L10n.screenRoomAttachmentSourceLocation, icon: \.locationPin)
.labelStyle(.menuSheet)
}
.accessibilityIdentifier(A11yIdentifiers.roomScreen.attachmentPickerLocation)
Button {
context.send(viewAction: .attach(.poll))
} label: {
Label(L10n.screenRoomAttachmentSourcePoll, icon: \.polls)
.labelStyle(.menuSheet)
}
.accessibilityIdentifier(A11yIdentifiers.roomScreen.attachmentPickerPoll)
if ServiceLocator.shared.settings.richTextEditorEnabled {
Button {
context.send(viewAction: .enableTextFormatting)
} label: {
Label(L10n.screenRoomAttachmentTextFormatting, icon: \.textFormatting)
.labelStyle(.menuSheet)
}
.accessibilityIdentifier(A11yIdentifiers.roomScreen.attachmentPickerTextFormatting)
}
}
}
}
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:015aaaa55f811ce9474d0758f11e6d3e55bc7deb3f6ac14841392d4b7e9423f2
size 707550
oid sha256:1814315276b9621711e1b9f66df068fb47d308297f45318ea89a25ff3676e873
size 708706
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8255d0f6cc667f318be027ee2ba011af51ba8e673753a9540d03d63c5be95364
size 787106
oid sha256:9054bcc523d299dbe7ac9d1bf8a872b0263bb90ccc13383224c4a1c71c4c9ec9
size 785650
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8e7dad79d56b8695e188f61b15401dc1dd74e8afdfc065bddb5f783ee9913752
size 752843
oid sha256:816b90d1d31fc84e19ef0318d0619d680ab7d3c84987d811ec86b54738a6cf57
size 753048
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0a11abd410d19ed463bd9155e84992bec7e1753ac298b2b95ef8c7a21577a137
size 865375
oid sha256:b03923620460adf38f959544ee655df6215f83d5937536b38f9f97aa3a0f8392
size 867141
+1
View File
@@ -0,0 +1 @@
Reorder available composer menu actions