don’t try to request more chat messages when no chat is active. This only affected smartphones.

This commit is contained in:
Stefan Breunig 2013-03-08 10:46:52 +01:00
parent fa82356ca8
commit 1e2935c018

View File

@ -389,6 +389,7 @@ window.chat.needMoreMessages = function() {
if(activeTab === 'debug') return; if(activeTab === 'debug') return;
var activeChat = $('#chat > :visible'); var activeChat = $('#chat > :visible');
if(activeChat.length === 0) return;
var hasScrollbar = scrollBottom(activeChat) !== 0 || activeChat.scrollTop() !== 0; var hasScrollbar = scrollBottom(activeChat) !== 0 || activeChat.scrollTop() !== 0;
var nearTop = activeChat.scrollTop() <= CHAT_REQUEST_SCROLL_TOP; var nearTop = activeChat.scrollTop() <= CHAT_REQUEST_SCROLL_TOP;