From 30c057e6da471a38819ab5d325e180f90f00e80b Mon Sep 17 00:00:00 2001 From: Blake DeMarcy Date: Sat, 9 Sep 2017 17:58:49 -0500 Subject: [PATCH] update usermap on search; show in headerline when searching --- clients/urwid/main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/clients/urwid/main.py b/clients/urwid/main.py index d392e40..84f16a2 100644 --- a/clients/urwid/main.py +++ b/clients/urwid/main.py @@ -727,15 +727,21 @@ class App(object): def search_callback(self, query): + threads, usermap = network.thread_index() + self.usermap.update(usermap) if self.mode == "index": results = [ - thread for thread in network.thread_index()[0] + thread for thread in threads if query in thread["title"].lower().strip().replace(" ", "") ] if results: self.index(threads=results) + if query: + self.set_header("Searching for '{}'", query) else: self.temp_footer_message("No results for '{}'".format(query)) + elif self.mode == "thread": + pass def thread_load(self, button, thread_id):