fix: show starred projects with most-recently-added first

This commit is contained in:
2025-12-18 08:34:48 -07:00
parent 306e221479
commit 3a4cdf78d8

View File

@@ -220,7 +220,7 @@ import { TIMEOUTS } from "@/utils/notify";
const INITIAL_BATCH_SIZE = 20; const INITIAL_BATCH_SIZE = 20;
const INCREMENT_SIZE = 20; const INCREMENT_SIZE = 20;
const RECENT_CONTACTS_COUNT = 3; const RECENT_CONTACTS_COUNT = 3;
const RECENT_BOOKMARKED_PROJECTS_COUNT = 3; const RECENT_BOOKMARKED_PROJECTS_COUNT = 10;
/** /**
* EntityGrid - Unified grid layout for displaying people or projects * EntityGrid - Unified grid layout for displaying people or projects
@@ -476,10 +476,11 @@ export default class EntityGrid extends Vue {
-RECENT_BOOKMARKED_PROJECTS_COUNT, -RECENT_BOOKMARKED_PROJECTS_COUNT,
); );
// Find projects matching those IDs, preserving the order // Find projects matching those IDs, sorting with newest first
const recentProjects = recentStarredIds const recentProjects = recentStarredIds
.map((id) => projects.find((p) => p.handleId === id)) .map((id) => projects.find((p) => p.handleId === id))
.filter((p): p is PlanData => p !== undefined); .filter((p): p is PlanData => p !== undefined)
.reverse();
return recentProjects; return recentProjects;
} }