don't use default object store on projects page

This commit is contained in:
Sami Samhuri 2010-11-27 01:28:06 -08:00
parent b01096280d
commit 2fcf0f543d

View file

@ -60,17 +60,18 @@
textHighlight('n' + name, things.length)
}
var t = ObjectStore.get('t-proj')
var data = createObjectStore('proj')
, t = data.get('t-proj')
, names = ['followers', 'following', 'repos', 'watched']
if (!t || +new Date() - t > 86400000) {
console.log('stale ' + String(t))
ObjectStore.set('t-proj', +new Date())
data.set('t-proj', +new Date())
names.forEach(function(name) {
GITR[name]('samsonjs', function(err, things) {
if (err) {
text('n' + name, '?')
} else {
ObjectStore.set(name, things)
data.set(name, things)
updateN(name, things)
}
})
@ -78,7 +79,7 @@
} else {
console.log('hit ' + t + ' (' + (+new Date() - t) + ')')
names.forEach(function(name) {
updateN(name, ObjectStore.get(name))
updateN(name, data.get(name))
})
}
}