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

Fix qualified category on rank status #2377

Merged
merged 8 commits into from
Apr 18, 2018
Merged

Conversation

Joehuu
Copy link
Member

@Joehuu Joehuu commented Apr 10, 2018

Qualified is actually number 3, and mod requests isn't a category at the moment.

@peppy
Copy link
Member

peppy commented Apr 10, 2018

Many of these are wrong (they are basd off the legacy stable api, which returns different status codes from the database).

Here's the correct values if you'd like to fix the others too:

    const STATES = [
        'graveyard' => -2,
        'wip' => -1,
        'pending' => 0,
        'ranked' => 1,
        'approved' => 2,
        'qualified' => 3,
        'loved' => 4,
    ];

@peppy peppy added this to the Candidate Issues milestone Apr 10, 2018
@Joehuu
Copy link
Member Author

Joehuu commented Apr 12, 2018

I'm confused, it works fine as is. The implementation was right, but Qualified was named Mod Requests for some reason.

I think those values you gave are for states(status of a map) not categories (i.e. ranked is a state, Ranked & Approved is a category; Any is a category that has all the states; WIP is not a category at all, it is part of the pending category.
TL;DR: I think the values you gave are states not categories b/c there is no Favourites, Any, or My Maps values. There is WIP which is not a category.

@peppy
Copy link
Member

peppy commented Apr 12, 2018

RankStatus was never intended to be categories. Please re-read my comment, where I tell you what the existing values were.

Please update it to match and add a new enum with the following:

        $statuses = [
            ['id' => 7, 'name' => trans('beatmaps.status.any')],
            ['id' => 0, 'name' => trans('beatmaps.status.ranked-approved')],
            ['id' => 1, 'name' => trans('beatmaps.status.approved')],
            ['id' => 3, 'name' => trans('beatmaps.status.qualified')],
            ['id' => 8, 'name' => trans('beatmaps.status.loved')],
            ['id' => 2, 'name' => trans('beatmaps.status.faves')],
            ['id' => 4, 'name' => trans('beatmaps.status.pending')],
            ['id' => 5, 'name' => trans('beatmaps.status.graveyard')],
            ['id' => 6, 'name' => trans('beatmaps.status.my-maps')],
        ];

Call it BeatmapSearchCategory

@Joehuu
Copy link
Member Author

Joehuu commented Apr 12, 2018

@peppy
Copy link
Member

peppy commented Apr 12, 2018

Okay, but this one still needs to be renamed

@peppy
Copy link
Member

peppy commented Apr 12, 2018

Sorry to be demanding, but I think this should also be moved to inside the SearchBeatmapSetsRequest file (at the bottom, not as a nested enum but just in that file).

Rationale: it's only ever used for online functionality.

smoogipoo
smoogipoo previously approved these changes Apr 18, 2018
Copy link
Contributor

@smoogipoo smoogipoo left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

# Conflicts:
#	osu.Game/Beatmaps/RankStatus.cs
#	osu.Game/Online/API/Requests/SearchBeatmapSetsRequest.cs
#	osu.Game/Overlays/Direct/FilterControl.cs
#	osu.Game/Overlays/DirectOverlay.cs
@smoogipoo smoogipoo merged commit bc31507 into ppy:master Apr 18, 2018
@Joehuu Joehuu deleted the fix-rank-status branch April 18, 2018 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants