Sort conversations in descending chronological order

This commit is contained in:
Antonio Scandurra 2023-06-23 10:05:21 +02:00
parent 5ea5368c07
commit c38bf2de33
2 changed files with 4 additions and 1 deletions

View file

@ -11,6 +11,7 @@ use gpui::AppContext;
use regex::Regex;
use serde::{Deserialize, Serialize};
use std::{
cmp::Reverse,
fmt::{self, Display},
path::PathBuf,
sync::Arc,
@ -97,6 +98,7 @@ impl SavedConversationMetadata {
});
}
}
conversations.sort_unstable_by_key(|conversation| Reverse(conversation.mtime));
Ok(conversations)
}