retrieve = function() {
  window.on_loading = true
  $.getScript("<%= messages_path(max_id: @messages.first.id, format: 'js') %>")
    .always(function() {
      window.on_loading = false
    });
};

(function () {
  var offset = $('#messages').scrollBottom();
  $('#messages').prepend('<%= j(render @messages) %>');
  $('#messages').scrollBottom(offset);
})();

retrieve = function() {
  window.on_loading = true
  $.getScript("<%= messages_path(max_id: @messages.first.id - 1, format: 'js') %>")
    .always(function() {
      window.on_loading = false
    });
};

(function () {
  var offset = $('#messages').scrollBottom();
  $('#messages').prepend('<%= j(render @messages) %>');
  $('#messages').scrollBottom(offset);
})();

Fix load offset of timeline
Fix load offset of timeline
