From 3fb78ae01ebe52c83ccd23509c2d11e9b7674503 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Fri, 18 Oct 2024 13:43:57 -0700 Subject: [PATCH] nav: use id_source instead of show argument Signed-off-by: William Casarin --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/nav.rs | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8edacc81..ff9d6e98 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1192,7 +1192,7 @@ dependencies = [ [[package]] name = "egui_nav" version = "0.1.0" -source = "git+https://github.com/damus-io/egui-nav?rev=6ba42de2bae384d10e35c532f3856b81d2e9f645#6ba42de2bae384d10e35c532f3856b81d2e9f645" +source = "git+https://github.com/damus-io/egui-nav?rev=956338a90e09c7cda951d554626483e0cdbc7825#956338a90e09c7cda951d554626483e0cdbc7825" dependencies = [ "egui", "egui_extras", diff --git a/Cargo.toml b/Cargo.toml index e0d60cb6..350bf89e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ eframe = { git = "https://github.com/emilk/egui", rev = "fcb7764e48ce00f8f8e58da egui_extras = { git = "https://github.com/emilk/egui", rev = "fcb7764e48ce00f8f8e58da10f937410d65b0bfb", package = "egui_extras", features = ["all_loaders"] } ehttp = "0.2.0" egui_tabs = { git = "https://github.com/damus-io/egui-tabs", branch = "egui-0.28" } -egui_nav = { git = "https://github.com/damus-io/egui-nav", rev = "6ba42de2bae384d10e35c532f3856b81d2e9f645" } +egui_nav = { git = "https://github.com/damus-io/egui-nav", rev = "956338a90e09c7cda951d554626483e0cdbc7825" } egui_virtual_list = { git = "https://github.com/jb55/hello_egui", branch = "egui-0.28", package = "egui_virtual_list" } reqwest = { version = "0.12.4", default-features = false, features = [ "rustls-tls-native-roots" ] } image = { version = "0.25", features = ["jpeg", "png", "webp"] } diff --git a/src/nav.rs b/src/nav.rs index 9dcf6ed5..c4ebfc7d 100644 --- a/src/nav.rs +++ b/src/nav.rs @@ -42,8 +42,9 @@ pub fn render_nav(col: usize, app: &mut Damus, ui: &mut egui::Ui) -> bool { let nav_response = Nav::new(routes) .navigating(app.columns_mut().column_mut(col).router_mut().navigating) .returning(app.columns_mut().column_mut(col).router_mut().returning) + .id_source(egui::Id::new(col_id)) .title(48.0, title_bar) - .show_mut(col_id, ui, |ui, nav| { + .show_mut(ui, |ui, nav| { let column = app.columns.column_mut(col); match &nav.top().route { Route::Timeline(tlr) => render_timeline_route(