Something went wrong. Try again.
Live STIB-MIVB departures on the Pebble Time 2. It covers the bus, tram, and metro network of Brussels
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738var items = [];var busy = false;
function next() { if (!items.length) { busy = false; return; } busy = true; var item = items[0]; Pebble.sendAppMessage( item.dict, function () { items.shift(); next(); }, function () { if (item.retried) { items.shift(); } else { item.retried = true; } next(); } );}
function push(dicts) { dicts.forEach(function (dict) { items.push({ dict: dict, retried: false }); }); if (!busy) { next(); }}
module.exports = { push: push };