diff options
Diffstat (limited to 'js/app')
-rw-r--r-- | js/app/services/businesslayer/feedbusinesslayer.coffee | 8 | ||||
-rw-r--r-- | js/app/services/persistence.coffee | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/js/app/services/businesslayer/feedbusinesslayer.coffee b/js/app/services/businesslayer/feedbusinesslayer.coffee index 93f89ad31..9a23bec43 100644 --- a/js/app/services/businesslayer/feedbusinesslayer.coffee +++ b/js/app/services/businesslayer/feedbusinesslayer.coffee @@ -188,8 +188,12 @@ FeedModel, NewLoading, _ExistsError, Utils, $rootScope, UndoQueue) -> faviconLink: 'url('+@_utils.imagePath('core', 'loading.gif')+')' @_feedModel.add(feed) - - @_persistence.importGoogleReader(json) + + onSuccess = (response) => + id = response.data.feeds[0].id + @load(id) + + @_persistence.importGoogleReader(json, onSuccess) return new FeedBusinessLayer(ShowAll, FeedModel, Persistence, ActiveFeed, diff --git a/js/app/services/persistence.coffee b/js/app/services/persistence.coffee index a5a6bc092..188f5a7c7 100644 --- a/js/app/services/persistence.coffee +++ b/js/app/services/persistence.coffee @@ -253,10 +253,11 @@ $rootScope) -> @_request.post 'news_feeds_update', params - importGoogleReader: (json) -> + importGoogleReader: (json, onSuccess) -> params = data: json: json + onSuccess: onSuccess @_request.post 'news_feeds_import_googlereader', params |