diff --git a/ElementX/Sources/Screens/RoomScreen/ComposerToolbar/View/RoomAttachmentPicker.swift b/ElementX/Sources/Screens/RoomScreen/ComposerToolbar/View/RoomAttachmentPicker.swift index 8c16af666..26fbf18bc 100644 --- a/ElementX/Sources/Screens/RoomScreen/ComposerToolbar/View/RoomAttachmentPicker.swift +++ b/ElementX/Sources/Screens/RoomScreen/ComposerToolbar/View/RoomAttachmentPicker.swift @@ -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) - } } } } diff --git a/UITests/Sources/__Snapshots__/Application/userSessionScreen-3-iPad-10th-generation-en-GB.UI.png b/UITests/Sources/__Snapshots__/Application/userSessionScreen-3-iPad-10th-generation-en-GB.UI.png index da54423a0..0925895e1 100644 --- a/UITests/Sources/__Snapshots__/Application/userSessionScreen-3-iPad-10th-generation-en-GB.UI.png +++ b/UITests/Sources/__Snapshots__/Application/userSessionScreen-3-iPad-10th-generation-en-GB.UI.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:015aaaa55f811ce9474d0758f11e6d3e55bc7deb3f6ac14841392d4b7e9423f2 -size 707550 +oid sha256:1814315276b9621711e1b9f66df068fb47d308297f45318ea89a25ff3676e873 +size 708706 diff --git a/UITests/Sources/__Snapshots__/Application/userSessionScreen-3-iPhone-15-en-GB.UI.png b/UITests/Sources/__Snapshots__/Application/userSessionScreen-3-iPhone-15-en-GB.UI.png index f9d3ba15e..98d3130d9 100644 --- a/UITests/Sources/__Snapshots__/Application/userSessionScreen-3-iPhone-15-en-GB.UI.png +++ b/UITests/Sources/__Snapshots__/Application/userSessionScreen-3-iPhone-15-en-GB.UI.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8255d0f6cc667f318be027ee2ba011af51ba8e673753a9540d03d63c5be95364 -size 787106 +oid sha256:9054bcc523d299dbe7ac9d1bf8a872b0263bb90ccc13383224c4a1c71c4c9ec9 +size 785650 diff --git a/UITests/Sources/__Snapshots__/Application/userSessionScreenRTE-1-iPad-10th-generation-en-GB.UI.png b/UITests/Sources/__Snapshots__/Application/userSessionScreenRTE-1-iPad-10th-generation-en-GB.UI.png index f840db23c..32f1268b8 100644 --- a/UITests/Sources/__Snapshots__/Application/userSessionScreenRTE-1-iPad-10th-generation-en-GB.UI.png +++ b/UITests/Sources/__Snapshots__/Application/userSessionScreenRTE-1-iPad-10th-generation-en-GB.UI.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e7dad79d56b8695e188f61b15401dc1dd74e8afdfc065bddb5f783ee9913752 -size 752843 +oid sha256:816b90d1d31fc84e19ef0318d0619d680ab7d3c84987d811ec86b54738a6cf57 +size 753048 diff --git a/UITests/Sources/__Snapshots__/Application/userSessionScreenRTE-1-iPhone-15-en-GB.UI.png b/UITests/Sources/__Snapshots__/Application/userSessionScreenRTE-1-iPhone-15-en-GB.UI.png index 6b4244876..5a077d2d6 100644 --- a/UITests/Sources/__Snapshots__/Application/userSessionScreenRTE-1-iPhone-15-en-GB.UI.png +++ b/UITests/Sources/__Snapshots__/Application/userSessionScreenRTE-1-iPhone-15-en-GB.UI.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a11abd410d19ed463bd9155e84992bec7e1753ac298b2b95ef8c7a21577a137 -size 865375 +oid sha256:b03923620460adf38f959544ee655df6215f83d5937536b38f9f97aa3a0f8392 +size 867141 diff --git a/changelog.d/2790.change b/changelog.d/2790.change new file mode 100644 index 000000000..d71f72e9e --- /dev/null +++ b/changelog.d/2790.change @@ -0,0 +1 @@ +Reorder available composer menu actions \ No newline at end of file