jsfehler / renpy-encyclopaedia

A Ren'Py plugin for creating an Encyclopaedia/Glossary/Bestiary or similar system.
https://renpy-encyclopaedia.readthedocs.io/
MIT License
58 stars 6 forks source link

Question mark (locked) entries at the top when sorting -- Confirmed fix proposition within #12

Open Yomic opened 8 months ago

Yomic commented 8 months ago

When sorting by "A to Z," "Z to A," "Subject," or "Unread" the locked entries denoted by "???" are sorted with the "letter" "?" at the top of the list.

To replicate this issue, unlock at least one entry while leaving a few others locked and sort by any of the above options. The "?" will be sorted above any alphanumeric entries leaving a bunch of locked entries to scroll past first.

Fix:

I fixed this issue on my end by changing this line (line 21) in "entry_sorting_ren.py" from:

new_list = sorted(seq, reverse=True, key=attrgetter('locked'))

to

new_list = sorted(seq, reverse=False, key=attrgetter('locked'))