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:
parent
498c7646b0
commit
791092ef13
7 changed files with 21 additions and 12 deletions
|
|
@ -35,7 +35,7 @@ data class AttachmentViewData(
|
|||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun list(status: Status): List<AttachmentViewData> {
|
||||
fun list(status: Status, alwaysShowSensitiveMedia: Boolean = false): List<AttachmentViewData> {
|
||||
val actionable = status.actionableStatus
|
||||
return actionable.attachments.map { attachment ->
|
||||
AttachmentViewData(
|
||||
|
|
@ -43,7 +43,7 @@ data class AttachmentViewData(
|
|||
statusId = actionable.id,
|
||||
statusUrl = actionable.url!!,
|
||||
sensitive = actionable.sensitive,
|
||||
isRevealed = !actionable.sensitive
|
||||
isRevealed = alwaysShowSensitiveMedia || !actionable.sensitive
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue