Skip to content

Commit

Permalink
Don't show notification on initial collection load
Browse files Browse the repository at this point in the history
Only shown for reloads. It doesn't really make sense to always start the app with the same message. The user can grab the path from the help modal if they're really not sure. Also it makes the gifs uglier.
  • Loading branch information
LucasPickering committed Jan 4, 2025
1 parent c63da9f commit 6996efc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

- Update [editor-command](https://crates.io/crates/editor-command), which replaces [shellish_parse](https://crates.io/crates/shellish_parse) with [shell-words](https://crates.io/crates/shell-words) for editor and pager command parsing
- There should be no impact to users
- Don't show "Loaded collection from ..." notification on initial load

## [2.4.0] - 2024-12-27

Expand Down
4 changes: 4 additions & 0 deletions crates/tui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,10 @@ impl Tui {
let messages_tx = self.messages_tx();
let collection_file = &self.collection_file;
self.view = View::new(collection_file, database, messages_tx);
self.view.notify(format!(
"Reloaded collection from {}",
collection_file.path().to_string_lossy()
));
}

/// GOODBYE
Expand Down
9 changes: 2 additions & 7 deletions crates/tui/src/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,10 @@ impl View {
None
};

let mut view = Self {
Self {
root: Root::new(&collection_file.collection).into(),
debug_monitor,
};
view.notify(format!(
"Loaded collection from {}",
collection_file.path().to_string_lossy()
));
view
}
}

/// Draw the view to screen. This needs access to the input engine in order
Expand Down

0 comments on commit 6996efc

Please sign in to comment.