This way the disk barely needs to be accessed when loading GitJournal,
and we can hide how long it takes GitJournal to parse all the notes in
the background.
Fixes#78
This is probably the largest commit that I have ever made. From now on -
every File always has an mtime and ctime which is fetched from git.
Notes can optionally override that time by providing yaml metadata.
Additionally the 'filePath' and 'folderPath' is now relative to the
repoPath instead of being the full path.
This will slow down GitJournal like crazy as all the mtimes and ctime
still need to be cached. For my test repo it takes about 23 seconds for
GitJournal to become responsive.
Instead there is a new type called 'UnopenedFile'. This was part of my
effort to not have everything inside the 'Note' class and to make it a
bit more immutable.
But, wow, this took a very long time. The 'Note' class seems to be very
deeply integrated everywhere.
Also simplify the loading logic. This makes it much easier to
understand.
With this, I can now slowly migrate the interface of a NotesFolder to be
based on Files instead of Notes.
I'm trying to expand GitJournal and let it understand the concept of
different Files. Right now everything is mashed into the "Note" class,
which is messy.