forked from Archives/Athou_commafeed
merge new infos into existing array instead of replacing the array completely, prevents full tree refresh and scrollbar location loss (fix #342)
This commit is contained in:
@@ -208,6 +208,13 @@ function($resource, $http) {
|
||||
callback(data);
|
||||
});
|
||||
};
|
||||
res.refresh = function(callback) {
|
||||
res.get(function(data) {
|
||||
_.merge(res.subscriptions, data);
|
||||
if (callback)
|
||||
callback(data);
|
||||
});
|
||||
};
|
||||
|
||||
res.init();
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user