element-hq / element-hq/element-android

Allow media/images to be hidden by default and on-demand

Open
#6,518 1 comment 4 reactions 0 assignees View on GitHub
A-Settings O-Uncommon S-Major S-Minor T-Enhancement
Dominant language
Kotlin
Stars
3.7k
Forks
917
Avg merge
8d 20h
Merged PRs (30d)
1

Description

### Your use case

#### What would you like to do?
Allow media (images, etc.) to be hidden, including by default, requiring a tap in order to be shown. Also allow shown images to be hidden, regardless of setting. This should be possible globally and on a per-room basis.

#### Why would you like to do it?
There are some rooms on the platform that receive frequent attacks that include posting of unpleasant images. There are other reasons someone might want this as well.

#### How would you like to achieve it?
Generally, this can be achieved in a similar manner to [Mastodon](https://github.com/mastodon/mastodon), which is a platform that handles this very well.
Some references: https://github.com/mastodon/mastodon/issues/336, https://github.com/mastodon/mastodon/issues/517.

Add toggles to the global settings and to per-room settings that disable auto-showing of media. The user can then tap to show or tap to hide the media.

When hidden, the media can either be obscured/blurred beyond recognition, or simply not shown in some other way. Some kind of text should indicate that the media is hidden, sensitive, etc. Tapping would show the media. Once shown, tapping again could either bring it to full-screen as usual or hide it. If tapping does not re-hide the media, there should be an added button to hide it. If it does, there should be an added button to bring it to full-screen instead.

Media should be automatically downloaded in the same manner that it is currently. Preventing auto-downloading of media should be handled via another setting, if it is to be handled. This potentially allows the client to severely blur/obscure the media prior to showing, and it allows the user to quickly device whether they want to re-hide the media, and for them to do so almost immediately.

See https://github.com/vector-im/element-web/issues/11687 for a similar issue.

### Have you considered any alternatives?

Mjolnir can be, and has been, used to automatically delete images during volatile periods. However, this has a few main issues:

1. It prevents *anyone* from posting media.
2. There is a split-second period during which the media can be seen before bot.mjolnir removes it.

### Additional context

I'm *willing* to provide a PR, but "able" is another question. :upside_down_face: I can try to take a look at it.

### Are you willing to provide a PR?

Yes

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.