Browse Source

check to avoid infinite loop of direct messages postboard updating

master
Simon Grim 10 years ago
parent
commit
fad1e9780a
  1. 11
      js/twister_directmsg.js

11
js/twister_directmsg.js

@ -45,12 +45,11 @@ function processDMsnippet(dmUsers, dmThreadList) {
$.MAL.dmThreadListLoaded(); $.MAL.dmThreadListLoaded();
} }
function requestDmConversationModal(dmConvo,dm_screenname) { function requestDmConversationModal(postboard, dm_screenname) {
if( dmConvo.parents(".modal-wrapper").css("display") == 'none' ) if (postboard.is('html *')) {
return; requestDmConversation(postboard, dm_screenname);
setTimeout(requestDmConversationModal, 1000, postboard, dm_screenname);
requestDmConversation(dmConvo,dm_screenname); }
setTimeout( function() {requestDmConversationModal(dmConvo,dm_screenname);}, 1000);
} }
function requestDmConversation(dmConvo,dm_screenname) { function requestDmConversation(dmConvo,dm_screenname) {

Loading…
Cancel
Save