     # 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
+    remove_read_feeds: remove_read_feeds
 
     #--------------------------------------------
     # Count the number of unread entries in a folder

    # Update folders
    feed_removed folder_id

  service =

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

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

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