18 Commits

Author SHA1 Message Date
acede95536 Dart: Add analysis_options
For now I've mostly tried to follow the same style guide as the flutter
repository, with many options disabled. Eventually, maybe it would make
sense to be far stricter.
2019-02-13 13:08:15 +01:00
dfd5d6f6d2 Note: Remove the asserts
We actually do quite often create notes without anything, and then later
fill them up. Lets just setup a bad default for the created.
2019-01-23 12:09:26 +01:00
2f8dd95ee9 Note: Never let the created be null
Null paramters are annoying, cause we then need to check if != null all
the time. I hate this about Dart. A type should always have sensible
defaults.
2019-01-23 11:47:46 +01:00
6dcd8ba48c Note: Compare via fileName if created is the same
This should make the test pass as the test notes have the same date
time.
2019-01-18 17:36:54 +01:00
905f501a6f Do not add a 'created' field if it does not exist
It should, but it's fine if it doesn't. It does look a bit strange
since Dart puts the date to Nov 0001, but whatever.
2019-01-18 16:58:06 +01:00
c99fe854a1 Note: Replace 'id' with 'fileName'
It all just makes far more since when each Note has a fileName.

Though we don't save the fileName in the YAML header. It seems quite
redundant to do that.

Another advantage of this is that if we can read any file ending with a
'.md' in a git repo. It doesn't need to be named exactly how we want it,
and we will still save the details correctly.
2019-01-18 16:12:03 +01:00
f7e2253f55 Fix serializer tests
* Map equality does not exist in Dart - how sucky!
* We no longer care about the micro-seconds
2019-01-18 15:37:19 +01:00
c6947b2ba6 Note: Make sure extraProperties is always initialized 2019-01-17 14:55:06 +01:00
a5ac547ecc Note: Allow extra yaml metadata to be set
This way if there is existing metadata, we aren't removing it when
writing the notes. The order isn't preserved, but meh, that's fine for
now.
2019-01-15 23:27:32 +01:00
075d353447 Write the date time in iso8601 + timezone
This is not perfect as when parsing the datetime, we're ignoring the
timezone.
2019-01-15 15:10:43 +01:00
a5830ccbc4 Load the journal list after onboarding 2019-01-10 13:03:00 +01:00
4bb02b12d6 Hookup the Journal app to git
Now notes are saved in the git repo, and immediately synced. This is not
the best implementation, as the notes are being reloaded a lot, and
the error handling is terrible (I miss golang). But it's the first
working poc.
2019-01-09 12:55:53 +01:00
eb2c9eb33f Note: Rename 'createdAt' to 'created'
My notes already use the key 'created', and I don't want to have to
change that.
2018-06-01 19:04:48 +02:00
fdf8c06c24 Add Note serializers
This way we don't only need to use json.
2018-06-01 18:57:53 +02:00
973f21a24c Give each Note a unique id
Otherwise we're overwriting that one note.
2018-05-21 17:04:03 +02:00
0cb36b2981 Make the state global and connect the add note screen
This is a huge work in progress, but it finally seems to kinda work.
2018-05-21 16:51:29 +02:00
4fcc6d9120 Add a FileStorage class
With a test!
2018-05-21 15:31:34 +02:00
8adfb776d0 Split NoteViewer into another file 2018-05-17 18:28:20 +02:00