Facepunch.Steamworks
Facepunch.Steamworks copied to clipboard
SortBy not sorting UNLESS Where function is added
Query q = Query.ItemsReadyToUse; q = q.WithTag("Mission"); q= q.SortByTitleAsc(); var result = await q.GetPageAsync(1);
The SortByTitleAsc isn't applied to the returned results. If a q = q.WhereUserSubscribed(); (or other Where functions) is applied to the results, the SortByTitle() IS applied. Any ideas why?
Note: none of the SortBy functions appear to work unless a Where() function is present
By the way, thanks so much for making this framework - it's super helpful and awesome!
What you should use is 'RankedByXXX', here are the reason:
Don't get confused by the name 'SortByXXX', these kind of query function are used as 'Query UGC associated with a user', that's why you need to use 'WhereXXX' function to specify a user. Facepunch will invoke the following SteamAPI internally:
UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage );
you can check out the following source code and API here: