@@ -285,13 +285,18 @@ def __init__(self) -> None:
285
285
class StreamsView (urwid .Frame ):
286
286
def __init__ (self , streams_btn_list : List [Any ], view : Any ) -> None :
287
287
self .view = view
288
- self . log = urwid . SimpleFocusListWalker ( streams_btn_list )
288
+ # Stream List
289
289
self .streams_btn_list = streams_btn_list
290
- self .focus_index_before_search = 0
290
+ self .log = urwid . SimpleFocusListWalker ( streams_btn_list )
291
291
list_box = urwid .ListBox (self .log )
292
+ # Stream Search
293
+ self .empty_search = False
294
+ self .focus_index_before_search = 0
295
+ self .search_lock = threading .Lock ()
292
296
self .stream_search_box = PanelSearchBox (
293
297
self , "SEARCH_STREAMS" , self .update_streams
294
298
)
299
+
295
300
super ().__init__ (
296
301
list_box ,
297
302
header = urwid .LineBox (
@@ -306,8 +311,6 @@ def __init__(self, streams_btn_list: List[Any], view: Any) -> None:
306
311
brcorner = "─" ,
307
312
),
308
313
)
309
- self .search_lock = threading .Lock ()
310
- self .empty_search = False
311
314
312
315
@asynch
313
316
def update_streams (self , search_box : Any , new_text : str ) -> None :
@@ -384,17 +387,22 @@ def __init__(
384
387
self , topics_btn_list : List [Any ], view : Any , stream_button : Any
385
388
) -> None :
386
389
self .view = view
387
- self .log = urwid .SimpleFocusListWalker (topics_btn_list )
388
- self .topics_btn_list = topics_btn_list
389
390
self .stream_button = stream_button
390
- self .focus_index_before_search = 0
391
+ # Topic List
392
+ self .topics_btn_list = topics_btn_list
393
+ self .log = urwid .SimpleFocusListWalker (topics_btn_list )
391
394
self .list_box = urwid .ListBox (self .log )
395
+ # Topic Search
396
+ self .empty_search = False
397
+ self .focus_index_before_search = 0
398
+ self .search_lock = threading .Lock ()
392
399
self .topic_search_box = PanelSearchBox (
393
400
self , "SEARCH_TOPICS" , self .update_topics
394
401
)
395
402
self .header_list = urwid .Pile (
396
403
[self .stream_button , urwid .Divider ("─" ), self .topic_search_box ]
397
404
)
405
+
398
406
super ().__init__ (
399
407
self .list_box ,
400
408
header = urwid .LineBox (
@@ -409,8 +417,6 @@ def __init__(
409
417
brcorner = "─" ,
410
418
),
411
419
)
412
- self .search_lock = threading .Lock ()
413
- self .empty_search = False
414
420
415
421
@asynch
416
422
def update_topics (self , search_box : Any , new_text : str ) -> None :
0 commit comments