commit cda0a68854d8a3d8c284d7814aafd0da6e22dc3d
parent a555707f677e2a16109ed567304dc9153b3d73d8
Author: kernelkind <kernelkind@gmail.com>
Date: Thu, 24 Jul 2025 17:35:57 -0400
add `route_uses_frame`
need to know this to get the correct drag id
Signed-off-by: kernelkind <kernelkind@gmail.com>
Diffstat:
1 file changed, 26 insertions(+), 0 deletions(-)
diff --git a/crates/notedeck_columns/src/nav.rs b/crates/notedeck_columns/src/nav.rs
@@ -1047,3 +1047,29 @@ fn get_scroll_id(
Route::Settings => None,
}
}
+
+/// Does the corresponding View for the route use a egui::Frame to wrap the ScrollArea?
+/// TODO(kernelkind): this is quite hacky...
+fn route_uses_frame(route: &Route) -> bool {
+ match route {
+ Route::Accounts(accounts_route) => match accounts_route {
+ crate::accounts::AccountsRoute::Accounts => true,
+ crate::accounts::AccountsRoute::AddAccount => false,
+ },
+ Route::Relays => true,
+ Route::Timeline(_) => false,
+ Route::Thread(_) => false,
+ Route::Reply(_) => false,
+ Route::Quote(_) => false,
+ Route::Settings => false,
+ Route::ComposeNote => false,
+ Route::AddColumn(_) => false,
+ Route::EditProfile(_) => false,
+ Route::Support => false,
+ Route::NewDeck => false,
+ Route::Search => false,
+ Route::EditDeck(_) => false,
+ Route::Wallet(_) => false,
+ Route::CustomizeZapAmount(_) => false,
+ }
+}