hide navigation title on global nav

Fixes: https://github.com/damus-io/notedeck/issues/109
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2024-06-24 16:47:35 -07:00
parent a9a07b3805
commit a66b467cb4
3 changed files with 15 additions and 9 deletions

View File

@@ -26,13 +26,19 @@ impl DesktopGlobalPopup {
let app_ctx = Rc::new(RefCell::new(app));
let resp = FixedWindow::maybe_with_title(title).show(ui, rect, |ui| {
let nav_response = Nav::new(routes).navigating(false).show(ui, |ui, nav| {
if let Some(resp) = nav.top().show_global_popup(&mut app_ctx.borrow_mut(), ui) {
ui.allocate_rect(resp.rect, Sense::hover())
} else {
ui.label("") // TODO(kernelkind): not a great practice
}
});
let nav_response =
Nav::new(routes)
.title(false)
.navigating(false)
.show(ui, |ui, nav| {
if let Some(resp) =
nav.top().show_global_popup(&mut app_ctx.borrow_mut(), ui)
{
ui.allocate_rect(resp.rect, Sense::hover())
} else {
ui.label("") // TODO(kernelkind): not a great practice
}
});
if let Some(NavAction::Returned) = nav_response.action {
app_ctx.borrow_mut().global_nav.pop();