ericcornelissen / NervousFish

An app for your :iphone: to exchange public-keys in a secure manner.
GNU Lesser General Public License v3.0
2 stars 4 forks source link

App/merge sorter, closes #13 #153

Closed KilianCallebaut closed 7 years ago

KilianCallebaut commented 7 years ago

What

Added an extendable method for switching between sorting types. Currently has sorting on name and sorting on keytype.

Why

This issue is needed for the project because the user want to be able to easily find contacts in a potentially very long list

How

There is an expandable listview adapter for sorting on groups (like keytype) and a listview adapter for sorting on direct information ( like the name). There are methods for switching between them. An iterator is used which sorts on the number corresponding to a sorting method.

Alternative implementation

An alternative solution was hard coding the different types for the keytypes and then using multiple adapters, but this would've been too complex for what it's worth.

Notes

There are multiple llistadapters and a new floatbutton for switching. The adapters are now in their own packets.