buffer bug fixed, now proper names are being displayed
This commit is contained in:
@@ -31,10 +31,14 @@ impl AppView {
|
||||
/// Returns the display name with dynamic context (for Form buffers)
|
||||
pub fn display_name_with_context(&self, current_table_name: Option<&str>) -> String {
|
||||
match self {
|
||||
AppView::Form(_) => {
|
||||
current_table_name
|
||||
.unwrap_or("Data Form")
|
||||
.to_string()
|
||||
AppView::Form(path) => {
|
||||
// Derive table name from "profile/table" path
|
||||
let table = path.split('/').nth(1).unwrap_or("");
|
||||
if !table.is_empty() {
|
||||
table.to_string()
|
||||
} else {
|
||||
current_table_name.unwrap_or("Data Form").to_string()
|
||||
}
|
||||
}
|
||||
_ => self.display_name().to_string(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user