Navigated back handing base
This commit is contained in:
+8
-1
@@ -58,6 +58,10 @@ impl NavigatedPage<RepetitionsMessage> for RepetitionsState {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
fn navigated(&mut self) {
|
||||
self.selected_set = None;
|
||||
}
|
||||
}
|
||||
|
||||
impl RepetitionsState {
|
||||
@@ -273,9 +277,12 @@ impl RepetitionsState {
|
||||
|
||||
if let Some(history) = history {
|
||||
for (date, activity) in history {
|
||||
let distance = *date - now;
|
||||
let distance = now - *date;
|
||||
let index = counts.len() as i64 - distance.num_days() - 1;
|
||||
|
||||
if index == 210 {
|
||||
println!("invalid index")
|
||||
}
|
||||
if index < 0 {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user