Skip to content

Versions ordered based on Github publishedAt can be wrong #84

@Moustachauve

Description

@Moustachauve

Right now the app uses the Github API value for publishedAt as the sorting value to get the latest version:

    func getLatestVersion(branch: Branch) -> Version? {
        let fetchRequest = Version.fetchRequest()
        fetchRequest.fetchLimit = 1
        fetchRequest.sortDescriptors = [NSSortDescriptor(key: "publishedDate", ascending: false)]
        var predicates = [NSPredicate]()
[...]

But this can lead to issues. For example, currently, version 0.15.5 has a more recent publishedAt date than 16.0.0.

We need to update the code to handle this in a more robust way. We should base ourselves on the semver version name instead of the published date. This is what we did for the android app in Moustachauve/WLED-Android#168 to fix Moustachauve/WLED-Android#167.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions