Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add the option to autoplay animated images #6166

Merged
merged 5 commits into from
May 30, 2022

Conversation

networkException
Copy link
Contributor

@networkException networkException commented May 26, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other:

Content

This pull request adds a new switch to the preferences, allowing users to enable autoplaying of animated images in their room timeline.

Motivation and context

This feature is already present in element-web and was commonly requested by the community:

The pull request resolves #1160, resolves #5094

Screenshots / GIFs

Before After
autoplay disabled autoplay enabled

Tests

  • Send a non animated image, an animated image and a video in to a room
  • Verify that the animated image animates only when the setting is enabled
  • Check that the video retains it's play button and the animated image hides the play button when autoplaying

Tested devices

  • Physical
  • Emulator
  • OS version(s): Android 12 x86_64, Android 5 x86_64

Checklist

networkException added a commit to networkException/element-android that referenced this pull request May 26, 2022
@ouchadam ouchadam added the Z-Community-PR Issue is solved by a community member's PR label May 27, 2022
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.
LGTM, just a small typo to fix.
Did not run the code though.

vector/src/main/res/values/strings.xml Outdated Show resolved Hide resolved
networkException added a commit to networkException/element-android that referenced this pull request May 30, 2022
This patch adds a new switch to VectorPreferences, the vector settings
preferences view and various classes propergating the set value of the
switch into parts of the application touched by the following patches.

Signed-off-by: networkException <[email protected]>
This patch adds the messageType field to MessageInformationData,
containing a nullable string representation of the message event's type.

Signed-off-by: networkException <[email protected]>
This patch removes dontAnimate() in the createGlideRequest() builder
conditionally depending on the user's animated image autoplay
preferences.

Resolves element-hq#1160, element-hq#5094

Signed-off-by: networkException <[email protected]>
This patch updates the logic checking whether to show the
playContentView to not show it when an animated image message would
autoplay its animation.

Signed-off-by: networkException <[email protected]>
@@ -973,6 +973,8 @@
<string name="settings_show_read_receipts_summary">Click on the read receipts for a detailed list.</string>
<string name="settings_chat_effects_title">Show chat effects</string>
<string name="settings_chat_effects_description">Use /confetti command or send a message containing ❄️ or 🎉</string>
<string name="settings_autoplay_animated_images_title">Autoplay animated images</string>
<string name="settings_autoplay_animated_images_summary">Play animated images in the timeline as soon as they are visible</string>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy with this wording. Wording on Web is Autoplay GIFs:

image

We may iterate later

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fast update!

@bmarty bmarty enabled auto-merge May 30, 2022 18:14
@bmarty bmarty merged commit 5de6771 into element-hq:develop May 30, 2022
piersonleo pushed a commit to piersonleo/element-android that referenced this pull request Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow option to autoplay GIF images Add option to autoplay GIF
3 participants