timeline: Fix day divider position in list
Take into account added dividers to insert them in the right spot.
This commit is contained in:
parent
b93bfe8726
commit
6d7cf7fc7e
1 changed files with 2 additions and 2 deletions
|
@ -179,8 +179,8 @@ impl Timeline {
|
||||||
ItemType::DayDivider(date) => Some(date.clone()),
|
ItemType::DayDivider(date) => Some(date.clone()),
|
||||||
_ => None,
|
_ => None,
|
||||||
});
|
});
|
||||||
for (position, date) in divider {
|
for (added, (position, date)) in divider.into_iter().enumerate() {
|
||||||
list.insert(position, date);
|
list.insert(position + added, date);
|
||||||
}
|
}
|
||||||
|
|
||||||
(added + divider_len) as u32
|
(added + divider_len) as u32
|
||||||
|
|
Loading…
Reference in a new issue