-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Todo sorting #449
Todo sorting #449
Conversation
76adab8
to
33289a5
Compare
@goldmanm I'm currently mobile so cant try, but will add some comments if I see something :). |
app/src/main/java/net/gsantner/markor/format/todotxt/TodoTxtTextModuleActions.java
Outdated
Show resolved
Hide resolved
app/src/main/java/net/gsantner/markor/format/todotxt/TodoTxtTextModuleActions.java
Outdated
Show resolved
Hide resolved
@@ -306,4 +328,68 @@ public boolean onLongClick(View v) { | |||
return new ArrayList<>(); | |||
} | |||
} | |||
|
|||
public class SttTaskComparator implements Comparator<SttTask> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could put that class aswell into Stt class (SttCommander for example). Theres no internal reference to the TextAction class right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting SttTaskComparator within SttCommander or SttTask throws an error since they are not enclosing classes. I've created a new file for SttTaskComparator next to SttTask.java instead of enclosing it within another class, since as you mentioned, it doesn't use any internal references to TextAction
This commit adds a dialogue used to sort todo.txt files by context, project, or priority.
This commit creates a class implementing Comparator so that SttTasks can be sorted with default Java sorting methods.
This commit adds a case which implements sorting of tasks in todo.txt files.
This commit adds a button to the toolbar which brings up the prompt to sort todo.txt files.
This commit used the reformat-text option on android-studio to improve code formatting.
33289a5
to
a002ed8
Compare
Thanks for working on it! 👍 Very Happy about contributions, even more you are welcome to continue to do so, after all it's a community project :-). As "ascending" and "project" "context" will be translated into user language, this split and |
This PR allows for users to sort todo.txt files by selecting an icon on the taskbar. Solves issue #211.