Fix extra clicks on media tab (#3930)

If:

1. You're viewing an account's media tab
2. Some of the media was marked sensitivei
3. The `alwaysShowSensitiveMedia` setting was `true`

tapping on the image (once) would do nothing visible, because it was
treated as the "reveal sensitive media" tap. You had to tap on it a
second time to open it.

Fix this, by passing the preference value through to the relevant code.

---------

Co-authored-by: Tiga! <maxiinne@proton.me>
This commit is contained in:
Nik Clayton 2023-08-07 19:30:56 +02:00 committed by GitHub
commit 791092ef13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 21 additions and 12 deletions

View file

@ -518,7 +518,11 @@ class NotificationsFragment :
override fun onViewMedia(position: Int, attachmentIndex: Int, view: View?) {
val status = adapter.peek(position)?.statusViewData?.status ?: return
super.viewMedia(attachmentIndex, list(status), view)
super.viewMedia(
attachmentIndex,
list(status, viewModel.statusDisplayOptions.value.showSensitiveMedia),
view
)
}
override fun onViewThread(position: Int) {