       $rootScope.show_read = false
       entriesPaginationSvc.reset_entries()
       $rootScope.feeds_loaded = false
+      remove_read_feeds()
       load_feeds()
 
     #---------------------------------------------

    # selected to display all feeds including read ones.
    # If the user clicks on the same feed or on its folder, do nothing.
    #--------------------------------------------
    remove_read_feeds: ->
      if !$rootScope.show_read
        read_feeds = $filter('filter') $rootScope.feeds, (feed)->
          return feed.unread_entries <= 0
        for feed in read_feeds
          if $rootScope.current_feed?.id != feed.id && $rootScope.current_folder?.id != feed.folder_id
            # Delete feed from the scope
            index = $rootScope.feeds.indexOf feed
            $rootScope.feeds.splice index, 1 if index != -1

    #--------------------------------------------
    # Count the number of unread entries in a folder

    # Update folders
    feed_removed folder_id

  #--------------------------------------------
  # PRIVATE FUNCTION: Remove feeds without unread entries from the root scope, unless the user has
  # selected to display all feeds including read ones.
  # If the user clicks on the same feed or on its folder, do nothing.
  #--------------------------------------------
  remove_read_feeds = ->
    if !$rootScope.show_read
      read_feeds = $filter('filter') $rootScope.feeds, (feed)->
        return feed.unread_entries <= 0
      for feed in read_feeds
        if $rootScope.current_feed?.id != feed.id && $rootScope.current_folder?.id != feed.folder_id
          # Delete feed from the scope
          index = $rootScope.feeds.indexOf feed
          $rootScope.feeds.splice index, 1 if index != -1

  service =

    #---------------------------------------------
