Fix crash 0.37 due to missing SortTypes #918
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes the crash due to missing sortTypes, added the ones that were added in 0.18.
Refactor the sorttypes stuff, it was kept in different lists all over the place, kept centrally now. Had to look everywhere to find random bits of sortType logic. Yeah sorry twizmazin about not putting this in a seperate PR but i was not going to write a bunch of duplicate code to remove it in the next pr.
When setting the value to TopThreeMonths or TopSixMonths or TopNineMonths. It causes a query error. It does not cause a crash but no posts load in anymore until you change it. I believe this is actually rather a backend issue. Maybe months did get added a different version?
Fixes #911
EDIT:
It seems these months ones weren't added yet. I have commented them for easy restoration for when they do get added. But that means they must be added again BEFORE they get released.
EDIT2:
I recommend actually keeping them as they get added in 18.1 and it causes no harm right now. It will only make it so that it will revert when set in the usersettings page. Or no posts will load in when set to one of these types