13 Commits

Author SHA1 Message Date
657721adc6 Update dart-git and stop using the Result class
Instead we're going to move back to standard exceptions.

Using a custom Result class has created far far more problems
- The Stacktraces aren't always right
- Sometimes one forgets to check the Result error
- All other exception throwing code needing to be converted to Results
- Non idiomatic Dart code

I think it's better to just go back to exceptions. They have their
problems, but overall, I think it's a better approach.
2023-11-24 14:03:30 +01:00
61e5304991 Ensure the File oid is never empty
This shouldn't be happening
2022-01-20 13:39:30 +01:00
7fce95c187 Make Note class immutable
This greatly simplifies the entire data flow. Though, it comes at the
risk of introducing bugs, but I think it's worth it.

Plus, it makes everything far far more testable.
2022-01-18 21:42:56 +01:00
e2b6d94eda analyzer: Fix unnecessry includes 2022-01-13 19:03:16 +01:00
f9271edad3 Upgrade to latest dart-git
Most of dart-git's operations are synchronous by default now. The async
functions run on another isolate.
2022-01-13 18:14:01 +01:00
787fd783b7 Reload the FileStorage cache if it is missing items
I'm not sure if this is a good idea as it results in the same Repo being
rebuilt again and again and again.
2021-12-29 11:20:28 +01:00
f70381b56a Avoid storing the GitRepository variable
It's better to open the GitRepository fresh each time. Also, in the
future this GitRepository will have a close method, and will keep some
file descriptors open, so it's important we don't leave it hanging.
2021-12-28 18:00:34 +01:00
c85ac3ed3e GitHistory: Always show the oldest date
Sometimes it jumps a lot, and that looks jarring.
2021-12-26 18:32:46 +01:00
f9bc48cbd1 Improve errors 2021-12-10 11:48:41 +01:00
a8e52ac18b CacheLoadingScreen: Show the git commit dates
Makes it easier to wait
2021-12-09 17:34:44 +01:00
b6c2c5b685 FileStorageCache: Populate it and save it 2021-11-04 14:55:57 +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
88697c1965 Make Note implement the 'File' interface.
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.
2021-10-15 12:41:54 +02:00