Skip to content

Commit

Permalink
prevent duplication of recent projects
Browse files Browse the repository at this point in the history
  • Loading branch information
ix0rai committed Dec 29, 2023
1 parent 2a5336a commit ec21bc3
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ public static Theme.Fonts currentFonts() {
}

public static void insertRecentProject(String jarPath, String mappingsPath) {
main().recentProjects.value().add(0, new RecentProject(jarPath, mappingsPath));
RecentProject project = new RecentProject(jarPath, mappingsPath);
if (!main().recentProjects.value().contains(project)) {
main().recentProjects.value().add(0, new RecentProject(jarPath, mappingsPath));
}
}

@Nullable
Expand Down

0 comments on commit ec21bc3

Please sign in to comment.