mirror of
https://github.com/xvxx/phetch
synced 2024-11-16 21:25:45 +00:00
drop history
This commit is contained in:
parent
09d52fdbd8
commit
23c94414b5
@ -90,6 +90,9 @@ impl UI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn add_page<T: View + 'static>(&mut self, view: T) {
|
fn add_page<T: View + 'static>(&mut self, view: T) {
|
||||||
|
if self.pages.len() > 0 && self.page < self.pages.len() - 1 {
|
||||||
|
self.pages.truncate(self.page + 1);
|
||||||
|
}
|
||||||
self.pages.push(Box::from(view));
|
self.pages.push(Box::from(view));
|
||||||
if self.pages.len() > 1 {
|
if self.pages.len() > 1 {
|
||||||
self.page += 1;
|
self.page += 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user