mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-03-29 23:29:10 +08:00
fix(workspace): sort daily memory by date and inline into file grid
- Sort daily memory list by filename (YYYY-MM-DD.md) instead of mtime so editing an older file no longer bumps it to the top - Move daily memory card inline with workspace MD file buttons - Shorten card description across all locales - Defer file creation until user actually saves (no empty file on create)
This commit is contained in:
@@ -106,8 +106,8 @@ pub async fn list_daily_memory_files() -> Result<Vec<DailyMemoryFileInfo>, Strin
|
||||
});
|
||||
}
|
||||
|
||||
// Sort by modified_at descending (newest first)
|
||||
files.sort_by(|a, b| b.modified_at.cmp(&a.modified_at));
|
||||
// Sort by filename descending (newest date first, YYYY-MM-DD.md)
|
||||
files.sort_by(|a, b| b.filename.cmp(&a.filename));
|
||||
|
||||
Ok(files)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user