@@ -302,13 +302,18 @@ def __init__(self) -> None:
302
302
class StreamsView (urwid .Frame ):
303
303
def __init__ (self , streams_btn_list : List [Any ], view : Any ) -> None :
304
304
self .view = view
305
- self . log = urwid . SimpleFocusListWalker ( streams_btn_list )
305
+ # Stream List
306
306
self .streams_btn_list = streams_btn_list
307
- self .focus_index_before_search = 0
307
+ self .log = urwid . SimpleFocusListWalker ( streams_btn_list )
308
308
list_box = urwid .ListBox (self .log )
309
+ # Stream Search
310
+ self .empty_search = False
311
+ self .focus_index_before_search = 0
312
+ self .search_lock = threading .Lock ()
309
313
self .stream_search_box = PanelSearchBox (
310
314
self , "SEARCH_STREAMS" , self .update_streams
311
315
)
316
+
312
317
super ().__init__ (
313
318
list_box ,
314
319
header = urwid .LineBox (
@@ -323,8 +328,6 @@ def __init__(self, streams_btn_list: List[Any], view: Any) -> None:
323
328
brcorner = "─" ,
324
329
),
325
330
)
326
- self .search_lock = threading .Lock ()
327
- self .empty_search = False
328
331
329
332
@asynch
330
333
def update_streams (self , search_box : Any , new_text : str ) -> None :
@@ -404,17 +407,22 @@ def __init__(
404
407
self , topics_btn_list : List [Any ], view : Any , stream_button : Any
405
408
) -> None :
406
409
self .view = view
407
- self .log = urwid .SimpleFocusListWalker (topics_btn_list )
408
- self .topics_btn_list = topics_btn_list
409
410
self .stream_button = stream_button
410
- self .focus_index_before_search = 0
411
+ # Topic List
412
+ self .topics_btn_list = topics_btn_list
413
+ self .log = urwid .SimpleFocusListWalker (topics_btn_list )
411
414
self .list_box = urwid .ListBox (self .log )
415
+ # Topic Search
416
+ self .empty_search = False
417
+ self .focus_index_before_search = 0
418
+ self .search_lock = threading .Lock ()
412
419
self .topic_search_box = PanelSearchBox (
413
420
self , "SEARCH_TOPICS" , self .update_topics
414
421
)
415
422
self .header_list = urwid .Pile (
416
423
[self .stream_button , urwid .Divider ("─" ), self .topic_search_box ]
417
424
)
425
+
418
426
super ().__init__ (
419
427
self .list_box ,
420
428
header = urwid .LineBox (
@@ -429,8 +437,6 @@ def __init__(
429
437
brcorner = "─" ,
430
438
),
431
439
)
432
- self .search_lock = threading .Lock ()
433
- self .empty_search = False
434
440
435
441
@asynch
436
442
def update_topics (self , search_box : Any , new_text : str ) -> None :
0 commit comments