var refresh_unread_count function tweetonica api get_friends function

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
var refresh_unread_count = function() {
tweetonica.api.get_friends(function(results){
var unread = {};
for (var key in results)
{
var g = results[key]
unread[display_group_name(g.name)] = g.unread;
}
var spans = $('#groups span')
for (var i=0; i<spans.length; i++)
{
var jgr = spans.eq(i);
if (jgr.attr('class') != 'unread')
{
var grname = jgr.text();
spans.eq(i+1).text(display_unread(unread[grname]));
}
}
})
};