mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28:21 +00:00
* generic popup stacking solution * allow going back to file-revision popup * do not select diff in coming back to files-revlog * handle filetree popup via stacking * allow going back to inspect commit * allow coming back to compare/inspect commit
16 lines
298 B
Rust
16 lines
298 B
Rust
use crate::queue::StackablePopupOpen;
|
|
|
|
#[derive(Default)]
|
|
pub struct PopupStack {
|
|
stack: Vec<StackablePopupOpen>,
|
|
}
|
|
|
|
impl PopupStack {
|
|
pub fn push(&mut self, popup: StackablePopupOpen) {
|
|
self.stack.push(popup);
|
|
}
|
|
|
|
pub fn pop(&mut self) -> Option<StackablePopupOpen> {
|
|
self.stack.pop()
|
|
}
|
|
}
|