Commit 9078b22c08

9078b22c085573fab0ccdf0492b2034d0c73ed24

parent: 34c85ad93d

Unsigned

Damir Jelić <poljar@termina.org.uk> · 2021-01-01 14:12 UTC

room: Correctly sort the buffer lines

Layout: unified · split

src/room/mod.rs +1 −2
@@ -34,7 +34,6 @@ pub const BUFFER_CLOSED_ERROR: &str =
3434use std::{
3535 borrow::Cow,
3636 cell::RefCell,
37 cmp::Reverse,
3837 collections::HashMap,
3938 ops::Deref,
4039 rc::Rc,
@@ -781,7 +780,7 @@ impl MatrixRoom {
781780 if let Ok(buffer) = self.buffer_handle().upgrade() {
782781 let mut lines: Vec<LineCopy> =
783782 buffer.lines().map(|l| l.into()).collect();
784 lines.sort_by_key(|l| Reverse(l.date));
783 lines.sort_by_key(|l| l.date);
785784
786785 for (line, new) in buffer.lines().zip(lines.drain(..)) {
787786 let tags =