codinguser / gnucash-android

Gnucash for Android mobile companion application.
Apache License 2.0
1.23k stars 540 forks source link

Sort the transfer accounts by favorite before sorting them alphabetically #622

Closed davidlandry93 closed 7 years ago

davidlandry93 commented 7 years ago

This is a series of commits that puts the favorite accounts on top of the other accounts transfer accounts list. It makes it easier to add transactions if you use some transfer accounts more frequently.

I was annoyed at the app because I only really use two transfer accounts and I had to scroll through all my accouts to get to my credit card.

To avoid any confusion, I made it so that the favorite "star" would show beside the name of the transfer accounts that are favorite. That way the user knows why they appear first.

Thanks for the consideration!

rivaldi8 commented 7 years ago

Thanks for the pull request! I think it's a good idea.

I've checked all the uses of QualifiedAccountNameCursorAdapter and I think all of them would be improved if the favorite accounts were listed first and with the star. So instead of implementing it as a separate FavoritableQualifiedAccountNameCursorAdapter class, just add the feature to QualifiedAccountNameCursorAdapter.

There's one thing I don't like, though. I agree that the favorite stars help to avoid confusion about why those entries appear first when showing the list. However, when a favorite account is selected, the star is still shown. I think it stands out too much and adds clutter. Also it looked a bit confusing when I first saw it. Could you try to hide it when the spinner list closed. It may be possible to do so from AdapterView.OnItemSelectedListener.onItemSelected. If it's not possible, I'd rather not show it for now.

Please, let me know if you need any help with this.

davidlandry93 commented 7 years ago

I think you are right, I'll look into it this weekend probably. Thanks!

rivaldi8 commented 7 years ago

Thanks! Merged.