diff FeedList.py @ 72:e8c2730eb444

control the display of unread feeds/all feeds via Preferences
author Dirk Olmes <dirk@xanthippe.ping.de>
date Wed, 11 Aug 2010 03:23:02 +0200
parents 228da10cc98b
children 5585f3d23541
line wrap: on
line diff
--- a/FeedList.py	Wed Aug 11 03:10:32 2010 +0200
+++ b/FeedList.py	Wed Aug 11 03:23:02 2010 +0200
@@ -1,11 +1,15 @@
 
 from Feed import Feed
 from FeedEntry import FeedEntry
+from Preferences import Preferences
 from sqlalchemy.orm import joinedload
 
 def getFeeds(session):
-#    return AllFeeds(session).getFeeds()
-    return UnreadFeeds(session).getFeeds()
+    preferences = Preferences(session)
+    if preferences.showOnlyUnreadFeeds():
+        return UnreadFeeds(session).getFeeds()
+    else:
+        return AllFeeds(session).getFeeds()
 
 class AllFeeds(object):
     '''A simple feed list that returns all feeds stored in the database'''