Skip to content
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

feat: prefer newer file when fetch #41

Merged

Conversation

SettingDust
Copy link
Contributor

No description provided.

@juraj-hrivnak
Copy link
Owner

Also, you probably want to do it here and here.

return this.files.filter { it.type in providers.map { provider -> provider.serialName } }
}

fun getLatestFile(providers: Collection<Provider>) = getFilesForProviders(providers).maxByOrNull { it.datePublished }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a question, what would happen when the datePublished is the default value?

Copy link
Contributor Author

@SettingDust SettingDust Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Natural order

@juraj-hrivnak juraj-hrivnak merged commit 876038b into juraj-hrivnak:main Oct 10, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done🎉
Development

Successfully merging this pull request may close these issues.

2 participants