vinnymac / PokeNurse

💉 A tool for Pokémon Go to aid in transferring and evolving Pokémon
284 stars 55 forks source link

Unable to sort by IV or anything other than the default value on OS X 10.11 #190

Closed adisor19 closed 7 years ago

adisor19 commented 7 years ago

Steps :

1) Sort by number of pokemons. (works) 2) Expand a species.(works) 3)Try and sort by IV or anything other than the default value and it fails on Mac OS 10.11 but works fine on macOS 10.12.

YesThatAllen commented 7 years ago

Until there's a chance for an update, sorting inside a species works so long as you sort the master list by sprite (I use the search box at the top to limit what's shown, making it easier to see the pokemon I want to evaluate)

(see also https://github.com/vinnymac/PokeNurse/issues/101#issuecomment-280889137)

vinnymac commented 7 years ago

I can go through the diff and see if I can find what caused this bug. Also you can't sort by sprite, but you can sort by Pokedex #, I assume this is what you are referring to.

It is weird that it would work on one OS but not the other, that is extremely odd to me. Perhaps it is just that it works under certain circumstances and not others.

YesThatAllen commented 7 years ago

I see.. the indicator looks like it's on "Sprite" to me.

screenshot_4196

As it is, I am unable to sort within a species unless the master list is sorted by pokedex number.

That's true for me on my macOS 10.12 and one running 10.10 (I don't have a 10.11 one to test on at the moment)

vinnymac commented 7 years ago

I am not sure what change broke this, but I can now tell that it is caused by sorting the monsters.species array. We are likely using that array to keep sort order for all the species, which we are using elsewhere to access for species data. Instead of being able to quickly find a species information we would need to iterate over every single pokemon which is much slower :/ Separating sort order + the data would be nice here.

So basically by sorting the table the wrong pokemon are placed in a position, for example if I sort by name instead of Zubat being in index 40, Kartana is. So the sorting still occurs, but on the completely incorrect 'mon.

YesThatAllen commented 7 years ago

Confirmed working in develop. Awesome!