app: walk back through the screens you came from
The arrow was hardwired per screen: from a review it led to the match history, even when the review was opened from a clip's card, and the clip view was torn down on the way out. App now keeps the trail of screens behind the one on screen. Opening a row, a card, or an exported clip pushes the screen it came from; the arrow and Escape pop. The title bar's Clips and Settings buttons and the number keys jump to a root with the match history behind them. A clip or a review that back can still reach is kept, paused where it was, so returning shows it again rather than reopening it; either is dropped once the trail no longer holds it.
This commit is contained in:
1 parent
c452fab735
commit
7213c119da
4 files changed
+115
-75
No files matched your search
@@ -74,7 +74,7 @@ pub fn open(app: &mut App, name: &str) {
|
||||
at: 0.0,
|
||||
long: 0.0,
|
||||
});
|
||||
app.screen = Screen::Clip;
|
||||
app.go(Screen::Clip);
|
||||
}
|
||||
|
||||
/// The recording a clip was cut from.
|
||||
|
||||
@@ -398,7 +398,7 @@ impl Default for Review {
|
||||
/// [`show`] when it arrives.
|
||||
pub fn open(app: &mut App, recording_id: &str) {
|
||||
leave(app);
|
||||
app.screen = Screen::Review;
|
||||
app.go(Screen::Review);
|
||||
app.review.loading = true;
|
||||
|
||||
let id = recording_id.to_string();
|
||||
@@ -583,8 +583,7 @@ pub fn tick(app: &mut App, tx: &mut Tx) -> bool {
|
||||
.file_stem()
|
||||
.and_then(|stem| stem.to_str())
|
||||
{
|
||||
// The review's soundtrack would keep playing under the clip view.
|
||||
leave(app);
|
||||
// The clip view takes over the sound, and the review waits behind it.
|
||||
app.refresh_clips();
|
||||
crate::screens::clip::open(app, name);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user