diff options
Diffstat (limited to 'js/app/services')
-rw-r--r-- | js/app/services/bl/folderbl.coffee | 24 | ||||
-rw-r--r-- | js/app/services/models/feedmodel.coffee | 2 |
2 files changed, 17 insertions, 9 deletions
diff --git a/js/app/services/bl/folderbl.coffee b/js/app/services/bl/folderbl.coffee index abba97054..42c1d9752 100644 --- a/js/app/services/bl/folderbl.coffee +++ b/js/app/services/bl/folderbl.coffee @@ -132,18 +132,24 @@ ItemModel, ShowAll, _ExistsError, OPMLParser)-> _importElement: (opml, parentFolderId) -> for item in opml.getItems() if item.isFolder() - try - @create item.getName(), (data) => - @_importElement(item, data.folders[0].id) - catch error - if error instanceof _ExistsError - folder = @_folderModel.getByName(item.getName()) - @open(folder.id) - @_importElement(item, folder.id) + do (item) => + try + @create item.getName(), (data) => + @_importElement(item, data.folders[0].id) + catch error + if error instanceof _ExistsError + folder = @_folderModel.getByName(item.getName()) + @open(folder.id) + @_importElement(item, folder.id) + else + console.info error else try - @_feedBl.create(item.getUrl(), parentFolderId) + do (item) => + @_feedBl.create(item.getUrl(), parentFolderId) catch error + if not error instanceof _ExistsError + console.info error return new FolderBl(FolderModel, FeedBl, ShowAll, ActiveFeed, Persistence, diff --git a/js/app/services/models/feedmodel.coffee b/js/app/services/models/feedmodel.coffee index 405ea2651..e0006e8d2 100644 --- a/js/app/services/models/feedmodel.coffee +++ b/js/app/services/models/feedmodel.coffee @@ -41,6 +41,8 @@ angular.module('News').factory '_FeedModel', if data.faviconLink == null data.faviconLink = 'url(' + @_utils.imagePath('news', 'rss.svg') + ')' + else + data.faviconLink = 'url(' + data.faviconLink + ')' ### We want to add a feed on the client side before we have an id from the server. Once the server returns |