|
|
|
|
@ -62,6 +62,7 @@ class LeftPane(urwid.ListBox):
|
|
|
|
|
if self.isCategoryView:
|
|
|
|
|
try:
|
|
|
|
|
self.currentCategory = focus_widget.attr_map[None][0]
|
|
|
|
|
Utils.writeLog(focus_widget.attr_map)
|
|
|
|
|
except BaseException:
|
|
|
|
|
self.currentCategory = None
|
|
|
|
|
|
|
|
|
|
@ -123,7 +124,7 @@ class LeftPane(urwid.ListBox):
|
|
|
|
|
return
|
|
|
|
|
elif key in ("l", "right"):
|
|
|
|
|
try:
|
|
|
|
|
if self.isCategoryView:
|
|
|
|
|
if self.isCategoryView and self.currentCategory != "Favorites":
|
|
|
|
|
self.isCategoryView = False
|
|
|
|
|
focus_widget, idx = self.get_focus()
|
|
|
|
|
self.categoryPosition = idx
|
|
|
|
|
@ -230,6 +231,21 @@ class RightPane(urwid.ListBox):
|
|
|
|
|
except BaseException:
|
|
|
|
|
pass
|
|
|
|
|
return
|
|
|
|
|
elif key in ("f"):
|
|
|
|
|
Utils.writeLog(tui.feedView.currentCategory)
|
|
|
|
|
if self.isList is True:
|
|
|
|
|
article_widget, article_idx = self.get_focus()
|
|
|
|
|
articleId = article_widget.attr_map[None]
|
|
|
|
|
tui.cache.toggleArticleStarred(articleId)
|
|
|
|
|
tui.categories = tui.cache.getCategories(tui.show_read)
|
|
|
|
|
item_widget, item_idx = tui.feedView.get_focus()
|
|
|
|
|
if tui.feedView.isCategoryView:
|
|
|
|
|
tui.feedView.fill(tui.categories, tui.feedView.isCategoryView)
|
|
|
|
|
Utils.writeLog(tui.feedView.currentCategory)
|
|
|
|
|
tui.feedView.set_focus(item_idx)
|
|
|
|
|
if item_idx == 0:
|
|
|
|
|
tui.feedView.setCategoryArticles(('Favorites', 'Favorites'))
|
|
|
|
|
|
|
|
|
|
elif key in ("r"):
|
|
|
|
|
if self.isList is True:
|
|
|
|
|
feeds = []
|
|
|
|
|
@ -274,7 +290,6 @@ class RightPane(urwid.ListBox):
|
|
|
|
|
focus_widget, idx = self.get_focus()
|
|
|
|
|
self.articlePosition = idx
|
|
|
|
|
articleId = focus_widget.attr_map[None]
|
|
|
|
|
Utils.writeLog(tui.feedView.currentCategory)
|
|
|
|
|
self.article = Render(*tui.cache.getArticle(articleId, tui.feedView.currentCategory == "Favorites"),
|
|
|
|
|
tui.cache.getArticleLinks(articleId))
|
|
|
|
|
walker = urwid.SimpleListWalker([urwid.Text(self.article.firstPage)])
|
|
|
|
|
|