 
     $(@previewButton).removeClass('active')
     $(@writeButton).addClass('active')
+
+
+  invalidatePreview: =>
+    $(@previewButton).attr('data-should-refresh', '1')
 
 
   posted: (e, data) =>

    .done (data) =>
      $(@previewBox).html(data)

      $(@previewButton).attr('data-should-refresh', '1')

      $(@input).one 'input', =>
        $(@previewButton).attr('data-should-refresh', '0')

      @showPreview()

  showPreview: =>
    $(@editBox).addClass('hidden')


    needReload = (@forum.postPosition($newPost[0]) - 1) != @forum.postPosition(@forum.endPost()) ||
      e.target.dataset.forceReload == '1'

    @invalidatePreview()

    if needReload
      osu.navigate $newPost.find('.js-post-url').attr('href')
