TheCacophonyProject / bird-monitor

Android application to regularly record birdsong for analysis
GNU General Public License v3.0
11 stars 9 forks source link

Fix Issues #31 register error unknown; #32 new group fail still adds to list; #23 sort groups #37

Closed jackodsteel closed 5 years ago

jackodsteel commented 5 years ago

Fixes #31 email address already being used error unknown.

Did a lot of refactoring, but also fixed the bug. Server returned valid data but we were checking strings exactly and it looks like the format changed. Modified the error text to use the message directly so it will still work even in new API versions too.

Simplified a lot of logic and moved most of the POST calls to OkHttp3 instead of raw calls as they're much easier to work with. This allowed a lot of logic to be refactored out/simplified too.

Fixes #32 group being added to list before server confirmation Added a callback to add the group only if the server returns success for the add group operation.

Fixes #23 Sorts groups on load and add