diff options
author | Blake DeMarcy <ofunknowndescent@gmail.com> | 2017-09-09 17:58:49 -0500 |
---|---|---|
committer | Blake DeMarcy <ofunknowndescent@gmail.com> | 2017-09-09 17:58:49 -0500 |
commit | 30c057e6da471a38819ab5d325e180f90f00e80b (patch) | |
tree | 301f4a139021592856a052a9d68aecb387a4f4f3 | |
parent | fa006d6d69c16764f5f662becb57c0495c210386 (diff) | |
download | bbj-30c057e6da471a38819ab5d325e180f90f00e80b.tar.gz |
update usermap on search; show in headerline when searching
-rw-r--r-- | clients/urwid/main.py | 8 |
1 files changed, 7 insertions, 1 deletions
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): |