feature/memories #35

Merged
cameron merged 11 commits from feature/memories into master 2025-08-16 16:42:39 +00:00
Showing only changes of commit 7dcf89c47e - Show all commits

View File

@@ -285,7 +285,10 @@ pub async fn list_memories(
}
}
// Sort by day of the month and time (using the created timestamp)
match span_mode {
// Sort by absolute time for a more 'overview'
MemoriesSpan::Month => memories_with_dates.sort_by(|a, b| a.1.cmp(&b.1)),
_ => {
memories_with_dates.sort_by(|a, b| {
let day_comparison = a.1.day().cmp(&b.1.day());
@@ -300,6 +303,9 @@ pub async fn list_memories(
day_comparison
}
});
}
}
// Sort by day of the month and time (using the created timestamp)
let items: Vec<MemoryItem> = memories_with_dates.into_iter().map(|(m, _)| m).collect();