standardnotes / iOS-classic

iOS client - (Deprecated) - New version: https://github.com/standardnotes/mobile
167 stars 21 forks source link

Sort notes by created_at/updated_at option #32

Closed dannysu closed 7 years ago

dannysu commented 7 years ago

Would love to have a "Sort by date updated" on the iOS app just like the desktop app. Seems like a non-intrusive addition that still keeps the app minimal, but usable. Thanks!

moughxyz commented 7 years ago

Seems reasonable.

jz709u commented 7 years ago

We don't update the date on each note when we modify a note. Shouldn't the notes be listed by updated date by default? So the top of the list is always the most recently updated note or created note

moughxyz commented 7 years ago

Well when we save a note, we merge the response of saved_items, which updates the modified date.

Notes are currently sorted by the date they were created. On Web, user can choose between sorting by most recently updated OR newly created.

I haven't yet thought of the UI for this, but I'm thinking two options:

  1. Change the "Tags" button on the top left to a "Filter" button, which brings up the filter screen which allows you to specify tags and also sort order.
  2. Add a sort button to the right of the search bar in the notes list. This might be the better, simpler option, but I'm not sure of a standard UI for this. Maybe button then action sheet on click.
jimmykaiser commented 7 years ago

What are the use cases for sorting by date created? The current sort means that notes remain in the order in which they were created, with new notes added to the top of the list.

I can think of a couple use cases for sorting by date updated by default:

The reason why I ask is it looks like a one-line change to the NSSortDescriptor() function would make it sort by date updated. Which I can happily propose in a pull request if you agree with my reasoning.

moughxyz commented 7 years ago

Let's see how this does: https://twitter.com/StandardNotes/status/858081402277031936

moughxyz commented 7 years ago

ac15766d5527cc75eb0160ccad2314912ada1790

Submitted to App Store.