Fix problems with date separator and messages scrolling fixes #68

pull/98/head
Rodrigo Nascimento 11 years ago
parent a9189fd1e8
commit ba8e4853cc
  1. 1
      client/startup/startup.coffee
  2. 2
      client/views/app/chatMessageDashboard.coffee
  3. 2
      client/views/app/chatWindowDashboard.html

@ -3,6 +3,7 @@ Meteor.startup ->
UserPresence.start()
window.lastMessageWindow = {}
window.lastMessageWindowHistory = {}
@defaultUserLanguage = ->
lng = window.navigator.userLanguage || window.navigator.language || 'en'

@ -68,7 +68,7 @@ Template.chatMessageDashboard.onRendered ->
chatMessages = $('.messages-box .wrapper')
message = $(this.firstNode)
if message.data('scroll-to-bottom')?
if this.data.scroll? and message.data('scroll-to-bottom')?
if message.data('scroll-to-bottom') and (this.parentTemplate().scrollOnBottom or this.data.data.uid is Meteor.userId())
chatMessages.stop().animate({scrollTop: 99999}, 1000 )
else

@ -29,7 +29,7 @@
</li>
{{/if}}
{{#each messagesHistory}}
{{#if newDate}}
{{#if newDateHistory}}
<li class="date">
<span>{{messageDate}}</span>
</li>

Loading…
Cancel
Save