add news imte if list is empty

This commit is contained in:
j 2012-02-23 23:45:56 +05:30
parent c1738fc346
commit 0ee23670e7

View file

@ -18,9 +18,13 @@ pandora.ui.news = function(width, height) {
pandora.api.getNews({}, function(result) {
items = result.data.items;
if(items.length) {
selected = items[0].id;
renderItem();
renderList();
} else if (isEditable) {
addItem();
}
});
function addItem() {