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 { } else {
oldStatus?.expanded ?: activeAccount.alwaysOpenSpoiler 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 val contentCollapsed = oldStatus?.contentCollapsed ?: true
timelineDao.insertStatus( timelineDao.insertStatus(

View File

@ -76,7 +76,7 @@ class NetworkTimelineRemoteMediator(
s.asStatusOrNull()?.id == status.id s.asStatusOrNull()?.id == status.id
}?.asStatusOrNull() }?.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 expanded = oldStatus?.isExpanded ?: activeAccount.alwaysOpenSpoiler
val contentCollapsed = oldStatus?.isCollapsed ?: true val contentCollapsed = oldStatus?.isCollapsed ?: true