diff --git a/js/twister_actions.js b/js/twister_actions.js index bec3efe..3626440 100644 --- a/js/twister_actions.js +++ b/js/twister_actions.js @@ -449,8 +449,13 @@ function queryStart(board, query, resource, timeoutArgs, intervalTimeout, extra) pending: [] } }; - for (i in extra) - twister.res[req][i] = extra[i]; + if (extra) { + for (i in extra) + twister.res[req][i] = extra[i]; + + if (typeof extra.ready === 'function') + extra.ready(req, extra.readyReq); + } } else { twister.res[req].board = board; for (var i in twister.res[req].twists.cached) diff --git a/js/twister_newmsgs.js b/js/twister_newmsgs.js index 92b3b1a..0577af6 100644 --- a/js/twister_newmsgs.js +++ b/js/twister_newmsgs.js @@ -135,11 +135,12 @@ function initMentionsCount() { lastTime: 0, lastTorrentId: -1, lengthNew: 0, + ready: function (req) { + twister.mentions = twister.res[req]; + loadMentionsFromStorage(); + }, skidoo: function () {return false;} }); - twister.mentions = twister.res[req]; - - loadMentionsFromStorage(); $.MAL.updateNewMentionsUI(twister.mentions.lengthNew); }