1414
1515from  .contacts  import  Contacts 
1616from  .messages  import  Broadcasts , Drafts , Inbox , Outbox , Sent , Trash 
17- from  .navigation_row  import  NavigationRow 
1817from  .profile_settings  import  ProfileSettings 
1918
2019for  t  in  Contacts , Broadcasts , Drafts , Inbox , Outbox , Sent , Trash , ComposeSheet :
@@ -33,7 +32,6 @@ class Content(Adw.BreakpointBin):
3332    split_view : Adw .OverlaySplitView  =  child 
3433
3534    sidebar_toolbar_view : Adw .ToolbarView  =  child 
36-     sidebar : Gtk .ListBox  =  child 
3735    stack : Adw .ViewStack  =  child 
3836    profile_settings : ProfileSettings  =  child 
3937
@@ -55,9 +53,6 @@ def header_bar_layout(self) -> str:
5553    def  __init__ (self , ** kwargs : Any ):
5654        super ().__init__ (** kwargs )
5755
58-         self .sidebar .set_header_func (self ._header_func )
59-         self .sidebar .select_row (self .sidebar .get_row_at_index (0 ))
60- 
6156        Property .bind (Profile .of (client .user ), "image" , self , "profile-image" )
6257        Property .bind (
6358            Notifier (), "sending" , self .sidebar_toolbar_view , "reveal-bottom-bars" 
@@ -68,24 +63,8 @@ def __init__(self, **kwargs: Any):
6863            lambda  * _ : self .notify ("header-bar-layout" ),
6964        )
7065
71-     def  _header_func (self , row : NavigationRow , * _args ):
72-         row .set_header (
73-             Gtk .Separator (
74-                 margin_start = 9 ,
75-                 margin_end = 9 ,
76-             )
77-             if  row .separator 
78-             else  None 
79-         )
80- 
8166    @Gtk .Template .Callback () 
82-     def  _on_row_selected (self , _obj , row : NavigationRow  |  None ):
83-         if  not  row :
84-             return 
85- 
86-         self .sidebar .select_row (row )
87-         self .stack .props .visible_child  =  row .page .props .child 
88- 
67+     def  _close_sidebar (self , * _args ):
8968        if  self .split_view .props .collapsed :
9069            self .split_view .props .show_sidebar  =  False 
9170
0 commit comments