1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

Only blindIn if the topic is not there

This commit is contained in:
Tim Düsterhus 2012-01-21 17:12:49 +01:00
parent c38eb73b12
commit 95712bd017

View File

@ -104,7 +104,7 @@ TimWolla.WCF ?= {}
$(this).text '' $(this).text ''
else else
$('#topic').text data.topic $('#topic').text data.topic
$('#topic').wcfBlindIn() if $('#topic').text().trim() isnt '' $('#topic').wcfBlindIn() if $('#topic').text().trim() isnt '' and $('#topic').is(':hidden')
$('title').text @titleTemplate.fetch(data) $('title').text @titleTemplate.fetch(data)
, this) , this)
@ -158,7 +158,7 @@ TimWolla.WCF ?= {}
dataType: 'json' dataType: 'json'
type: 'POST' type: 'POST'
success: $.proxy((data, textStatus, jqXHR) -> success: $.proxy((data, textStatus, jqXHR) ->
if (!@isActive && $('#chatNotify').data('status') is 1) if (!@isActive and $('#chatNotify').data('status') is 1)
@newMessageCount += data.messages.length @newMessageCount += data.messages.length
if (@newMessageCount > 0) if (@newMessageCount > 0)
@timeout = setTimeout $.proxy(() -> @timeout = setTimeout $.proxy(() ->