- @QtCore.Slot(str,str,result=str)
- def getPreviousId(self, key, articleid):
- feed = listing.getFeed(key)
- return feed.getPreviousId(articleid)
+ @QtCore.Slot(str,str,bool,result=str)
+ def getPreviousId(self, key, articleid, onlyUnread):
+ if (onlyUnread):
+ print self.cachedList, articleid
+ index = self.cachedList.index(articleid)
+ return self.cachedList[(index - 1) % len(self.cachedList)]
+ else:
+ feed = listing.getFeed(key)
+ return feed.getPreviousId(articleid)