 ## A message is "naturally" folded if it is flagged as minimized or deleted.
 ## It still will be default-folded if it's an image referenced in another
 ## message that is not naturally folded.
-export naturallyFolded = (data) -> data.minimized or data.deleted
+export naturallyFolded = (message) -> message.minimized or message.deleted
 
 ## Cache EXIF orientations, as files should be static
 image2orientation = {}

    undefined
  , [message._id]

  ## Transform images
  messageBodyRef = useRef()
  ## Retransform when window width changes
  [windowWidth, setWindowWidth] = useState window.innerWidth
  useEventListener 'resize', (e) -> setWindowWidth window.innerWidth
  useEffect ->
    ## Transform any images embedded within message body
    trackers =
      for img in messageBodyRef.current.querySelectorAll """

  ## Maintain id2dom mapping
  useEffect ->
    id2dom[message._id] = ref.current
    ->
      delete id2dom[message._id]
      checkImage message._id
  , [message._id]
  ## Scroll to this message if it's been requested.
  useEffect ->
