16 Commits

Author SHA1 Message Date
0a5b2bdc3e NoteMaterializedView: Add a file mtime
Just in case the file has been modified from another source.
2022-01-21 17:13:39 +01:00
b46ae0b811 Rebuild the entire 'File' when reloading 2022-01-20 18:08:50 +01:00
d27915c4cb MaterializedView: Use the oid instead of the filePath
Shorter and more accurate
2022-01-20 12:28:08 +01:00
0488714e89 Refactor note file naming logic
I want to make the note class immutable, and the file path naming logic
is the toughest part.
2022-01-14 12:55:27 +01:00
de5cec30f3 Avoid using the same hive cache for all the materialized views
We were using the same one for each repo.
2021-12-26 18:32:46 +01:00
e1ea7a4953 Fetch the modified + created time from git
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.
2021-10-26 17:49:08 +02:00
729764c518 Remove NoteLoadState
It's no longer required as a Note can never be in an Error state, it
becomes an 'IgnoredFile'
2021-10-18 13:09:47 +02:00
88a8b77704 MaterializedView: Do not compute for notes that not loaded
Otherwise they land up being blank and are then never updated.
2021-10-15 17:43:12 +02:00
9ced45f5ab Delete and try again on Hive box corruption
Fixes APP-1GE
2021-10-11 21:17:10 +02:00
4bf0a78fee MaterializedView: Avoid re-computing many times
Ideally the Note's lastModified shouldn't ever be 0.
2021-09-17 09:55:33 +02:00
33a731a3d7 Add reuse licensing to files in lib 2021-09-15 13:06:43 +02:00
c53b7ebbd1 Note: fileLastModified should never be null
This simplifies so much of the code.
2021-09-07 00:00:42 +02:00
23221a0c4c MaterializedView: Delete old invalid items 2021-09-06 16:57:34 +02:00
d209ed4d30 MaterializedViewProvider: Make the fetch function async
Also make the contructor sync, this makes everything much easier.
2021-09-06 14:15:38 +02:00
a270a58cf8 MaterializedView: Pass the template argument properly 2021-09-05 11:50:01 +02:00
130eb852b2 Note: Move summary to a MaterializedView
This way it doesn't need to be computed each time the app loads.
2021-08-31 21:48:27 +02:00