working profiler tree

This commit is contained in:
filipriec
2025-03-21 22:20:43 +01:00
parent d55dff8a3e
commit 911dba9bce
5 changed files with 70 additions and 10 deletions

View File

@@ -69,7 +69,7 @@ pub fn render_ui(
);
if let Some(sidebar_rect) = sidebar_area {
sidebar::render_sidebar(f, sidebar_rect, theme);
sidebar::render_sidebar(f, sidebar_rect, theme, &ui_state.profile_tree);
}
render_status_line(f, root[1], current_dir, theme, is_edit_mode);

View File

@@ -32,10 +32,15 @@ pub async fn run_ui() -> Result<(), Box<dyn std::error::Error>> {
// Initialize FormState with dynamic fields
let mut form_state = FormState::new(column_names);
// Fetch profile tree and table structure
let profile_tree = grpc_client.get_profile_tree().await?;
let table_structure = grpc_client.get_table_structure().await?;
// The rest of your UI initialization remains the same
let mut event_handler = EventHandler::new();
let event_reader = EventReader::new();
let mut app_state = AppState::new()?;
app_state.ui.profile_tree = profile_tree;
// Fetch the total count of Adresar entries
let total_count = grpc_client.get_adresar_count().await?;