prevent media visibility from changing when refreshing timelines (#4319)

classic operator precendence issue

closes #4317
This commit is contained in:
Konrad Pozniak 2024-03-11 17:18:43 +01:00 committed by GitHub
parent d5eb37595c
commit 0b87ba2031
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -166,7 +166,7 @@ class CachedTimelineRemoteMediator(
} else {
oldStatus?.expanded ?: activeAccount.alwaysOpenSpoiler
}
val contentShowing = oldStatus?.contentShowing ?: activeAccount.alwaysShowSensitiveMedia || !status.actionableStatus.sensitive
val contentShowing = oldStatus?.contentShowing ?: (activeAccount.alwaysShowSensitiveMedia || !status.actionableStatus.sensitive)
val contentCollapsed = oldStatus?.contentCollapsed ?: true
timelineDao.insertStatus(

View File

@ -76,7 +76,7 @@ class NetworkTimelineRemoteMediator(
s.asStatusOrNull()?.id == status.id
}?.asStatusOrNull()
val contentShowing = oldStatus?.isShowingContent ?: activeAccount.alwaysShowSensitiveMedia || !status.actionableStatus.sensitive
val contentShowing = oldStatus?.isShowingContent ?: (activeAccount.alwaysShowSensitiveMedia || !status.actionableStatus.sensitive)
val expanded = oldStatus?.isExpanded ?: activeAccount.alwaysOpenSpoiler
val contentCollapsed = oldStatus?.isCollapsed ?: true