mpcjanssen / simpletask-android

GNU General Public License v3.0
547 stars 127 forks source link

onSort() LUA example? #978

Open FallenSpaces opened 5 years ago

FallenSpaces commented 5 years ago

I read the help page in the app, as well as the LUA script page, but I'm a highly visual person, and I usually don't understand programming concepts unless I see examples (sometimes several are needed).

Digging through the LUA docs doesn't seem logical since I just need a simple, specific example for this use case, and then I can most likely figure everything else out from there.

Can anyone point me to, or show me, an example of how onSort() works?

I just want to sort by priority, then by due date.

mpcjanssen commented 5 years ago

If you just want to sort by priority and then due date, you don't really need Lua. Any reason you are trying to do this in Lua? That said, more Lua examples would be nice.

FallenSpaces commented 5 years ago

Ah, I did not know that I needed to drag the sort blocks into order. I kept tapping the arrows thinking that might do what I needed, which it definitely did not ha.

Maybe this should be a bit more clear? I'm pretty aware of UI functionality, but this was not obvious to me.

This removed any task that's not prioritized though. How can I display those other tasks even with things sorted?

But yeah, more Lua examples would be great too, for the future!

mpcjanssen commented 5 years ago

It should sort all unprioritised tasks at the end not remove them. Also I agree the drag and drop functionality is not super intuitive. I am open to suggestions to make it more discoverable.

FallenSpaces commented 5 years ago

You're right, I got confused by seeing it all sorted, and thought that I had unprioritized tasks previously.

Just doing a quick google search, I found this example. It would probably look better with only four dots or something.

Maybe the inversion arrows could go on the right, and the drag and drop indicators on the usual left.

Thanks for the awesome app btw