-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: reverse listing of saved badges #570
Conversation
@refactor-droidyy this would be useful if the files were read according to the date of creation. But right now it just reads the files in ascending order. |
@adityastic so do we need to add date data in badge Config JSON. |
@refactor-droidyy Config is just meant to store the config data, so let's just leave it for the important badge information. Let's sort this file list with date created then reverse it. |
when { | ||
a.lastModified() - b.lastModified() > 0 -> 1 | ||
a.lastModified() - b.lastModified() < 0 -> -1 | ||
else -> 0 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return a.lastModified() - b.lastModified()
@iamareebjamal, please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iamareebjamal looks good to me 👍
Fixes #569