diff --git a/CHANGES.md b/CHANGES.md index d657337b..dd9cc737 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,6 +15,7 @@ Bugfix: - Date change message repeats for each redaction until a normal message (#358) - Slide-in reply icon is distorted (#423) - Regression / e2e replies not encrypted + - Some video won't play Translations: - diff --git a/vector/src/main/java/im/vector/riotx/features/home/room/detail/readreceipts/DisplayReadReceiptsBottomSheet.kt b/vector/src/main/java/im/vector/riotx/features/home/room/detail/readreceipts/DisplayReadReceiptsBottomSheet.kt index b8c1519f..42ad1664 100644 --- a/vector/src/main/java/im/vector/riotx/features/home/room/detail/readreceipts/DisplayReadReceiptsBottomSheet.kt +++ b/vector/src/main/java/im/vector/riotx/features/home/room/detail/readreceipts/DisplayReadReceiptsBottomSheet.kt @@ -69,7 +69,7 @@ class DisplayReadReceiptsBottomSheet : VectorBaseBottomSheetDialogFragment() { val dividerItemDecoration = DividerItemDecoration(epoxyRecyclerView.context, LinearLayout.VERTICAL) epoxyRecyclerView.addItemDecoration(dividerItemDecoration) - bottomSheetTitle.text = getString(R.string.read_receipts_list) + bottomSheetTitle.text = getString(R.string.read_at) epoxyController.setData(displayReadReceiptArgs.readReceipts) } diff --git a/vector/src/main/java/im/vector/riotx/features/media/VideoContentRenderer.kt b/vector/src/main/java/im/vector/riotx/features/media/VideoContentRenderer.kt index 22650b0e..0509a0d4 100644 --- a/vector/src/main/java/im/vector/riotx/features/media/VideoContentRenderer.kt +++ b/vector/src/main/java/im/vector/riotx/features/media/VideoContentRenderer.kt @@ -89,18 +89,44 @@ class VideoContentRenderer @Inject constructor(private val activeSessionHolder: }) } } else { - thumbnailView.isVisible = false - loadingView.isVisible = false val resolvedUrl = contentUrlResolver.resolveFullSize(data.url) if (resolvedUrl == null) { + thumbnailView.isVisible = false + loadingView.isVisible = false errorView.isVisible = true errorView.setText(R.string.unknown_error) } else { - videoView.isVisible = true - videoView.setVideoPath(resolvedUrl) - videoView.start() + + //Temporary code, some remote videos are not played by videoview setVideoUri + //So for now we download them then play + thumbnailView.isVisible = true + loadingView.isVisible = true + + activeSessionHolder.getActiveSession() + .downloadFile( + FileService.DownloadMode.FOR_INTERNAL_USE, + data.eventId, + data.filename, + data.url, + null, + object : MatrixCallback { + override fun onSuccess(data: File) { + thumbnailView.isVisible = false + loadingView.isVisible = false + videoView.isVisible = true + + videoView.setVideoPath(data.path) + videoView.start() + } + + override fun onFailure(failure: Throwable) { + loadingView.isVisible = false + errorView.isVisible = true + errorView.text = errorFormatter.toHumanReadable(failure) + } + }) } } } diff --git a/vector/src/main/res/drawable/pill_receipt_black.xml b/vector/src/main/res/drawable/pill_receipt_black.xml new file mode 100644 index 00000000..e6390355 --- /dev/null +++ b/vector/src/main/res/drawable/pill_receipt_black.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/vector/src/main/res/drawable/pill_receipt_dark.xml b/vector/src/main/res/drawable/pill_receipt_dark.xml new file mode 100644 index 00000000..5442f139 --- /dev/null +++ b/vector/src/main/res/drawable/pill_receipt_dark.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/vector/src/main/res/drawable/pill_receipt_light.xml b/vector/src/main/res/drawable/pill_receipt_light.xml new file mode 100644 index 00000000..66875dc1 --- /dev/null +++ b/vector/src/main/res/drawable/pill_receipt_light.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/vector/src/main/res/layout/activity_video_media_viewer.xml b/vector/src/main/res/layout/activity_video_media_viewer.xml index f21e6daf..c68577bc 100644 --- a/vector/src/main/res/layout/activity_video_media_viewer.xml +++ b/vector/src/main/res/layout/activity_video_media_viewer.xml @@ -34,7 +34,9 @@ android:id="@+id/videoMediaViewerThumbnailView" android:layout_width="match_parent" android:layout_height="match_parent" + android:layout_gravity="center" android:visibility="gone" + android:scaleType="centerInside" tools:visibility="visible" /> \ No newline at end of file diff --git a/vector/src/main/res/layout/item_simple_reaction_info.xml b/vector/src/main/res/layout/item_simple_reaction_info.xml index 06f94fc8..02a36fc6 100644 --- a/vector/src/main/res/layout/item_simple_reaction_info.xml +++ b/vector/src/main/res/layout/item_simple_reaction_info.xml @@ -6,6 +6,7 @@ android:gravity="center_vertical" android:orientation="horizontal" android:paddingStart="8dp" + android:minHeight="40dp" android:paddingEnd="8dp"> diff --git a/vector/src/main/res/layout/view_read_receipts.xml b/vector/src/main/res/layout/view_read_receipts.xml index e3cbc6ba..f477a979 100644 --- a/vector/src/main/res/layout/view_read_receipts.xml +++ b/vector/src/main/res/layout/view_read_receipts.xml @@ -9,48 +9,55 @@ diff --git a/vector/src/main/res/values/attrs.xml b/vector/src/main/res/values/attrs.xml index 368c03c0..e9a4296a 100644 --- a/vector/src/main/res/values/attrs.xml +++ b/vector/src/main/res/values/attrs.xml @@ -88,6 +88,7 @@ + diff --git a/vector/src/main/res/values/strings_riotX.xml b/vector/src/main/res/values/strings_riotX.xml index 118fde84..23ea1e2f 100644 --- a/vector/src/main/res/values/strings_riotX.xml +++ b/vector/src/main/res/values/strings_riotX.xml @@ -2,5 +2,6 @@ + Read at \ No newline at end of file diff --git a/vector/src/main/res/values/styles_riot.xml b/vector/src/main/res/values/styles_riot.xml index 80f5148a..d1894254 100644 --- a/vector/src/main/res/values/styles_riot.xml +++ b/vector/src/main/res/values/styles_riot.xml @@ -319,4 +319,23 @@ @drawable/vector_label_background_light + + + + \ No newline at end of file diff --git a/vector/src/main/res/values/theme_black.xml b/vector/src/main/res/values/theme_black.xml index 7b582e20..129a2e9b 100644 --- a/vector/src/main/res/values/theme_black.xml +++ b/vector/src/main/res/values/theme_black.xml @@ -75,6 +75,8 @@ #FF4D4D4D + @drawable/pill_receipt_black + @color/riot_primary_background_color_black @color/primary_color_black diff --git a/vector/src/main/res/values/theme_dark.xml b/vector/src/main/res/values/theme_dark.xml index b5796eb9..41432292 100644 --- a/vector/src/main/res/values/theme_dark.xml +++ b/vector/src/main/res/values/theme_dark.xml @@ -163,6 +163,8 @@ @android:color/white @color/riot_primary_text_color_dark + @drawable/pill_receipt_dark + @drawable/direct_chat_circle_dark #FF454545 diff --git a/vector/src/main/res/values/theme_light.xml b/vector/src/main/res/values/theme_light.xml index 56f2b90b..8d51486e 100644 --- a/vector/src/main/res/values/theme_light.xml +++ b/vector/src/main/res/values/theme_light.xml @@ -163,6 +163,8 @@ @color/riot_primary_text_color_light @android:color/white + @drawable/pill_receipt_light + @drawable/direct_chat_circle_light #FFD3EFE1