fix: Show media when opening a thread, based on user preferences (#93)

A previous change dropped the check to see if media was marked as
sensitive, and so all media was hidden when viewing a thread. Reinstate
the check so only sensitive media is hidden (if the user preferences are
set that way).
This commit is contained in:
Nik Clayton 2023-09-24 21:23:29 +02:00 committed by GitHub
parent 9b21f3f9bf
commit 04025e99ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,7 +124,7 @@ class ViewThreadViewModel @Inject constructor(
StatusViewData.from(
status = status.actionableStatus,
isExpanded = timelineStatusWithAccount.viewData?.expanded ?: alwaysOpenSpoiler,
isShowingContent = timelineStatusWithAccount.viewData?.contentShowing ?: alwaysShowSensitiveMedia,
isShowingContent = timelineStatusWithAccount.viewData?.contentShowing ?: (alwaysShowSensitiveMedia || !status.actionableStatus.sensitive),
isCollapsed = timelineStatusWithAccount.viewData?.contentCollapsed ?: true,
isDetailed = true,
)
@ -133,7 +133,7 @@ class ViewThreadViewModel @Inject constructor(
timelineStatusWithAccount,
gson,
isExpanded = alwaysOpenSpoiler,
isShowingContent = alwaysShowSensitiveMedia,
isShowingContent = (alwaysShowSensitiveMedia || !status.actionableStatus.sensitive),
isDetailed = true,
)
}