Repository navigation
v0.1.15 — the habit list is alphabetical
The habits screen no longer lists your habits in the order you happened to create them.
Install
Open this page on the phone, tap constanza-0.1.15.apk, install over the previous version. No database change.
The list was never really sorted
The habits screen looked like it was ordered by creation date. It was not ordered by anything.
Every habit carries a sortOrder field, and the query that reads the list sorts by it. But nothing has ever written a value into that field: the editor sets it to 0 on creation and there is no gesture anywhere in the app to reorder a habit. So every row held the same 0, the sort had nothing to distinguish them by, and the database handed them back in the order they were physically stored — which happens to be the order they were added.
It looked like a rule. It was an accident that had been holding steady.
Now the screen sorts by name, and it sorts properly: afeitarme sits between Ánimo and Cenar, where a reader expects it, rather than being exiled for starting with a lowercase letter or carrying an accent. Comparing text by its raw character codes puts every capital ahead of every lowercase letter and throws accented words past the end of the alphabet — so Cenar would have come before afeitarme, and Ánimo after Trabajar. The list now uses a real language-aware comparison instead.
The archived list is sorted the same way.
What did not change
The Today screen decides its own order, and it still does. It groups your habits into sections by time of day, which is a more useful arrangement than the alphabet when the question is what do I do next — so the sorting was applied to the management screen alone, and deliberately not to the query the two screens share.