Skip to content

Commit

Permalink
fix(ui/chat-folder-bar): Always fall back to main chat list
Browse files Browse the repository at this point in the history
  • Loading branch information
marhkb committed Oct 26, 2023
1 parent c56e659 commit e37176f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ui/session/sidebar/chat_folder/bar.blp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ template $PaplSidebarChatFolderBar {
layout-manager: BinLayout {};

notify::chat-folder-list => $on_notify_chat_folder_list();
notify::selected-chat-list => $on_notify_selected_chat_list();

EventControllerScroll {
scroll => $on_scroll_vertical() swapped;
Expand Down
7 changes: 7 additions & 0 deletions src/ui/session/sidebar/chat_folder/bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ mod imp {
}
}

#[template_callback]
fn on_notify_selected_chat_list(&self) {
if self.obj().selected_chat_list().is_none() {
self.on_notify_chat_folder_list();
}
}

#[template_callback]
fn on_scroll_vertical(
&self,
Expand Down

0 comments on commit e37176f

Please sign in to comment.