Skip to content

Commit

Permalink
prevent media visibility from changing when refreshing timelines (#4319)
Browse files Browse the repository at this point in the history
classic operator precendence issue

closes #4317
  • Loading branch information
connyduck authored Mar 11, 2024
1 parent d5eb375 commit 0b87ba2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 0b87ba2

Please sign in to comment.