mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Reply to a poll (#1848)
<!-- Please read [CONTRIBUTING.md](https://github.com/vector-im/element-x-android/blob/develop/CONTRIBUTING.md) before submitting your pull request --> ## Type of change - [x] Feature - [ ] Bugfix - [ ] Technical - [ ] Other : ## Content Polls can now be replied to. ## Motivation and context User story: https://github.com/vector-im/element-meta/issues/1976 ## Screenshots / GIFs <!-- We have screenshot tests in the project, so attaching screenshots to a PR is not mandatory, as far as there is a Composable Preview covering the changes. In this case, the change will appear in the file diff. Note that all the UI composables should be covered by a Composable Preview. Providing a video of the change is still very useful for the reviewer and for the history of the project. You can use a table like this to show screenshots comparison. Uncomment this markdown table below and edit the last line `|||`: |copy screenshot of before here|copy screenshot of after here| |Before|After| |-|-| ||| --> ## Tests <!-- Explain how you tested your development --> - Step 1 - Step 2 - Step ... ## Tested devices - [ ] Physical - [ ] Emulator - OS version(s): ## Checklist <!-- Depending on the Pull Request content, it can be acceptable if some of the following checkboxes stay unchecked. --> - [ ] Changes have been tested on an Android device or Android emulator with API 23 - [ ] UI change has been tested on both light and dark themes - [ ] Accessibility has been taken into account. See https://github.com/vector-im/element-x-android/blob/develop/CONTRIBUTING.md#accessibility - [ ] Pull request is based on the develop branch - [ ] Pull request includes a new file under ./changelog.d. See https://github.com/vector-im/element-x-android/blob/develop/CONTRIBUTING.md#changelog - [ ] Pull request includes screenshots or videos if containing UI changes - [ ] Pull request includes a [sign off](https://matrix-org.github.io/synapse/latest/development/contributing_guide.html#sign-off) - [ ] You've made a self review of your PR
This commit is contained in:
+8
-1
@@ -25,6 +25,7 @@ import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.outlined.GraphicEq
|
||||
import androidx.compose.material.icons.outlined.Image
|
||||
import androidx.compose.material.icons.outlined.Poll
|
||||
import androidx.compose.material.icons.outlined.VideoCameraBack
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
@@ -122,6 +123,12 @@ fun AttachmentThumbnail(
|
||||
)
|
||||
*/
|
||||
}
|
||||
AttachmentThumbnailType.Poll -> {
|
||||
Icon(
|
||||
imageVector = Icons.Outlined.Poll,
|
||||
contentDescription = info.textContent,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -129,7 +136,7 @@ fun AttachmentThumbnail(
|
||||
|
||||
@Parcelize
|
||||
enum class AttachmentThumbnailType : Parcelable {
|
||||
Image, Video, File, Audio, Location, Voice
|
||||
Image, Video, File, Audio, Location, Voice, Poll
|
||||
}
|
||||
|
||||
@Parcelize
|
||||
|
||||
+1
@@ -30,6 +30,7 @@ open class AttachmentThumbnailInfoProvider : PreviewParameterProvider<Attachment
|
||||
anAttachmentThumbnailInfo(type = AttachmentThumbnailType.File),
|
||||
anAttachmentThumbnailInfo(type = AttachmentThumbnailType.Location),
|
||||
anAttachmentThumbnailInfo(type = AttachmentThumbnailType.Voice),
|
||||
anAttachmentThumbnailInfo(type = AttachmentThumbnailType.Poll),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user