28 Commits

Author SHA1 Message Date
f75e119995 Make Settings take the folderName as a parameter 2020-10-23 02:29:48 +02:00
9499cea164 Remove Settings global
Stop it being a singleton. This means it needs to be passed around a
lot. This sucks, but it's how it should be. I shouldn't be using a
global variable to get around this.

This is needed as Settings will soon become repo specific when we
support multiple repos.

This breaks saving the settings in a file, that feature was toggled off
anyway. It needs to be thought over again.
2020-10-09 00:59:19 +02:00
30f9f86ad3 Fix all the broken tests because of title change 2020-07-29 15:58:43 +02:00
9d00fdac06 Use import_sorter
flutter pub run import_sorter:main --no-comments

The code feels much cleaner
2020-07-24 12:43:28 +02:00
bcbf54106f Handle empty checklists
If there were no items we were ignoring the checklist. Added some extra
tests as well.

Fixes #148
2020-05-26 13:43:41 +02:00
70ec10b7bc Checklist Parser: Make it a bit more robust
Allow the space after `[ ]` to be optional. Just like in Github.
2020-05-01 18:44:38 +02:00
01db30c613 Automatically migrate from old checklist format
This way people existing checklists do not disappear
2020-05-01 18:42:18 +02:00
b919f1f2ba Follow GitHub's Checklist format
Fixes #71

It's easier to not use the Markdown parser and just go line by line and
do it myself. This does make it a bit less extensible though.
2020-05-01 18:28:13 +02:00
1bae5c7a19 Merge branch 'checklist_Format2' 2020-05-01 16:54:43 +02:00
f53aa53683 Checklist: Maintain the case of 'x' 2020-04-14 17:46:24 +02:00
1c869bc02b Checklist: Adapt other tests
This still doesn't fix all the tests
2020-04-06 01:29:49 +02:00
219e241deb Checklist: Add support for upper case 'X'
Requires an extra commit in markd
2020-04-06 01:14:36 +02:00
de2c82f4bd Try to support the proper checklist format
According the markdownguide.org, the checklist items are always inside a
list. It can any kind of list, but they are inside a list.

This commit breaks the old syntax and most of the tests. It also
requires a custom version of markd :/
2020-04-06 01:10:44 +02:00
26f641380d Checklist: Avoid extra \n
The markdown parser is weird.
2020-04-02 17:56:48 +02:00
b252f037b3 Rename NotesFolder -> NotesFolderFS
And NotesFolderReadOnly to NotesFolder. It just makes more sense this
way as we're now getting more and more different "types" of
NotesFolders.
2020-03-15 02:01:07 +01:00
4f5c44812f checklists: Do not add unnecessary \n 2020-02-17 01:05:35 +01:00
27875eba0c ChecklistTest: Add missing await 2020-02-17 00:50:06 +01:00
e5a6236cfc Checklists: Ensure there is one item at the start 2020-02-16 22:57:58 +01:00
8cabb07483 checklist: verify insertItem works 2020-02-15 02:30:00 +01:00
7221befcc1 Checklist: Make sure \n exists before adding a new checklist item 2020-02-15 02:28:49 +01:00
7df3e9dce0 ChecklistEditor: Allow adding an item by pressing enter 2020-02-13 17:19:12 +01:00
c7981606bf Checklist: Do not add extra \n while parsing
Now the checklist editor is finally somewhat usable.
2020-02-11 17:21:32 +01:00
380434368d Checklist Test: Remove modified field
When running it on the CI, the timezone is not the same and this causes
some problems.
2020-02-10 18:21:33 +01:00
4c23c28671 checklist: Improve test 2020-02-10 17:27:14 +01:00
dbbe8589c6 Checklists: Allow items to be removed 2020-02-10 17:02:45 +01:00
8bebe91bc0 Checklist: Allow adding new items
It's not perfect as we don't maintain focus, but it's a great start.
2020-02-10 16:45:20 +01:00
9373988054 Checklist: Implement serialization back into Note 2020-02-10 16:03:48 +01:00
b98a42543e Add a Checklist class 2020-02-10 15:44:08 +01:00