setCurrent can wait

This commit is contained in:
calzoneman 2013-07-03 11:32:44 -04:00
parent f6b02a166a
commit 7d232b80dc
2 changed files with 5 additions and 2 deletions

View File

@ -749,7 +749,8 @@ Callbacks = {
$("#queue").scrollTop(0); $("#queue").scrollTop(0);
var scroll = li.position().top - $("#queue").position().top; var scroll = li.position().top - $("#queue").position().top;
$("#queue").scrollTop(scroll); $("#queue").scrollTop(scroll);
} },
can_wait: true
}); });
}, },

View File

@ -980,7 +980,9 @@ function queueAction(data) {
if(!("expire" in data)) if(!("expire" in data))
data.expire = Date.now() + 5000; data.expire = Date.now() + 5000;
if(!data.fn()) { if(!data.fn()) {
if(Date.now() < data.expire) if(data.can_wait && Date.now() < data.expire)
PL_QUEUED_ACTIONS.push(data);
else if(Date.now() < data.expire)
PL_QUEUED_ACTIONS.unshift(data); PL_QUEUED_ACTIONS.unshift(data);
} }
if(PL_QUEUED_ACTIONS.length == 0) { if(PL_QUEUED_ACTIONS.length == 0) {