thread: fix ordering and duplication bugs

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin committed 2024-07-31 13:55:06 -07:00
1 parent dd9f41b04a
commit c3fc4e09e8
5 files changed
+30 -45

No files matched your search

+2 -1
View File
@@ -96,13 +96,14 @@ impl<'a> ThreadView<'a> {
ui.spacing_mut().item_spacing.y = 0.0;
ui.spacing_mut().item_spacing.x = 4.0;
let ind = len - 1 - start_index;
let note_key = {
let thread = self
.app
.threads
.thread_mut(&self.app.ndb, &txn, root_id)
.get_ptr();
thread.view.notes[start_index].key
thread.view.notes[ind].key
};
let note = if let Ok(note) = self.app.ndb.get_note_by_key(&txn, note_key) {