782 Commits

Author SHA1 Message Date
bc31d5bed3 Revert "Android: Enable r8 code minifier"
This reverts commit a7b25cece14dec12118cb63e05a0f2cb4b9cf36e.

The Crashlytics symbols uploder complains a lot - That it is
experimental and unsupported.
2019-12-12 00:42:45 +01:00
2581b67ac5 crashlytics: Fix path to debug symbols
It has changed because of the flavoured build.
2019-12-12 00:23:10 +01:00
591ba30762 Fix flutter analyze 2019-12-11 21:48:46 +01:00
abb6029798 Allow Folders to be deleted
For safety we're only allowing non-empty folders to be deleted. Ideally,
we should have some kind of undo button. Or some kind of history - since
we do have that with git.

Related to #18
2019-12-11 21:43:08 +01:00
453a6c518d Allow Sub Folders to be created
Fixes #34
2019-12-11 21:18:12 +01:00
27d5af8b01 FolderListing: Change the scaffold when a folder is selected
This way it's way more obvious. Also, add a back button so the user can
cancel the selection more explicitly.
2019-12-11 21:09:40 +01:00
0e8fe78323 Upgrade flutter_markdown
Fixes #32

With this we support all of GitHub Markdown format, excluding html.
2019-12-11 20:54:07 +01:00
4dde743fce Update version of firebase analytics 2019-12-11 20:50:34 +01:00
e5c3bb3fdb Add a 'dev' and 'prod' build flavour
Now whenever we run 'flutter run' or 'flutter build' we need to pass the
flavour flag. It seems there is no way to set a default flavour.

This is required as I want to be able to not have to reconfigure my
local GitJournal app (which I use for note-taking) vs the one I'm
developing where I might change many different settings for the basis of
testing.

Specially since I don't use Github/GitLab to store my notes, so the
setup process is a bit more involved.
2019-12-11 20:45:51 +01:00
cadff86073 Update .gitignore 2019-12-11 20:09:59 +01:00
a7b25cece1 Android: Enable r8 code minifier 2019-12-11 20:09:24 +01:00
8defd7c3d4 Flutter 1.12 - Initialize widgets if main func is async 2019-12-11 20:09:08 +01:00
fdc3c6b601 Upgrade intl for compatibility with Flutter 1.12 2019-12-11 20:01:32 +01:00
4f2fcb0b72 Fix flutter analyze: Add missing const 2019-12-09 02:01:24 +01:00
ad6d47ef0f Fix dateTime to string with timezone
We should just use the 'timezone' dart package and not handle this
ourselves as we're probably fucking it up in other places.

This fixes #42
2019-12-09 01:56:46 +01:00
a33fb88fb0 Fix tests paths 2019-12-09 01:42:01 +01:00
880f290d82 New note: fix 'created' not being serialized 2019-12-09 01:36:55 +01:00
b0b7da5291 Move storage classes into core
The Git functionality is fairly core!
2019-12-09 01:19:44 +01:00
cd24d2688f Never let the Note be in an invalid state
It's a bit confusing that the created date has to be set when creating a
new note, and the path had to be constructured properly, without which
the note shouldn't be saved. Ideally, an object shouldn't be able exist
in such an inconsistent state.
2019-12-09 01:14:45 +01:00
ca83cb79a6 JournalListing: Remove recursive option
We aren't using it, and if we implement a recursive option it should
somehow showcase which folder it is under. Evernote does it in an
interesting way.
2019-12-09 00:53:53 +01:00
6c10fa8a0f Improve Note sorting
* First by modified
* Then by created
* Then by file Path

I feel like there must be a simpler way of writing this compareTo
function.
2019-12-09 00:14:00 +01:00
76f70f0d18 Note: Store when last modified
Also sort the notes based on when last modified. Now that we're moving
towards being a more note-taking app, it makes sense that a recently
modified note goes on top.

Of course, the sorting should be controllable by the user, but the
default probably should be by when modified.
2019-12-09 00:02:40 +01:00
e3688cb0d9 ChangeLog: Make it more succinct 2019-12-09 00:01:52 +01:00
bd95d291f6 Bump version number 2019-12-08 03:01:43 +01:00
8a49d948f0 StateContainer: Do not call setState when the notesFolder changes
The NotesFolder is now a listenable and is always accessed via Provider,
and therefore doesn't need setState to be called when it is modified.
2019-12-08 02:58:56 +01:00
ee9d38e420 NotesFolder: Make sure listeners are always added/removed
Also make sure the _entities and _entityMap are always in sync.

The NotesFolder is complex enough that it could really use some proper
unit testing. Though since it is so tightly coupled to the FileSystem,
it would be quite an elaborate test to write.
2019-12-08 02:26:35 +01:00
1eb9611140 Do not reparse every note on any change
Earlier whenever anything changed we would discard all the Notes +
NotesFolders in memory, and reconstruct the hierarchy. This would means
Notes which haven't changed at all, still need to parsed all over again.

Now we only reload what has actually changed.

This should result in a huge performance boost.

We still shouldn't be loading everything on boot, but that's a different
problem.
2019-12-08 01:56:59 +01:00
62207eb6c7 StateContainer: Mark a field final
With this we're one step closer to making the StateContainer a stateless
widget.
2019-12-08 01:27:40 +01:00
92f0109733 NotesFolder: Allow only one folder to be loaded
We don't always need to load everything recursively.
2019-12-08 01:26:20 +01:00
7dafdaa617 StateContainer: noteRepo doesn't need to be public
Also lets call it gitRepo instead
2019-12-08 01:10:50 +01:00
9e2d59f3fa NotesFolder: Listen to changes of the subFolders and Notes
A NotesFolder doesn't only change when a note/folder is added or
removed. It is also changed when the contents of the Notes/Folders it
contains have changed.
2019-12-08 01:04:28 +01:00
644ef47076 NotesFolder rename: Actually update the filePath
The filePath was still the old one, this was causing all kinds of
errors.
2019-12-07 17:06:46 +01:00
0b1a41f3bd FolderListing: Use Provider to fetch the NotesFolder
This is our first use case of trying to use 'Provider' for state
management. Right now, we're doing state management quite horribly as
all the widgets are rebuilt whenever the state of the app changes.

With this, we can now start to refactor and only rebuild the widgets
whose data has changed.

There we many many different state management solutions to choose from,
I've settled on Provider, as it seems like the simplest to integrate
into the code base. Bloc/Redux seemed like they would add too much
complexity for me.
2019-12-07 16:30:39 +01:00
6288a7cfa0 NotesFolder: Notify listeners on rename 2019-12-07 16:30:39 +01:00
ff7ccea390 Fix changelog 2019-12-07 16:21:15 +01:00
d0107b6a26 Fix flutter analyze 2019-12-06 23:58:22 +01:00
9e0addf201 Update the docs to reflect that we're a Note taking app
We're moving away from focussing solely on Journaling. Lets update the
README to reflect that.
2019-12-06 23:43:42 +01:00
015ee5e43b Bump version number
And update Changelog
2019-12-06 23:35:27 +01:00
23dd7c05f6 README: Change subtitle
We're moving away from being a "Journaling" app to a more general note
taking application. For me, Journaling is a sub-section of Note taking.
2019-12-06 21:35:53 +01:00
8c6a33456a Allow folders to be renamed
This is a huge change which involves -
* Implementing Folder renames on the FS + Git level
* Implementing the concept of selecting an item in the FoldersListView,
  this feature isn't provided by default, and even now I'm not sure if
  the semantics which I've implemented are correct. I haven't
  implemented multiple folder selection for now.

Related to issue #18

Also, we're now one step closer to allowing notes to be renamed (#23)
2019-12-06 21:32:41 +01:00
073e76bcba AppDrawer: Try to highlight the selected route
This looks okayish in normal mode, but looks very ugly in dark mode, so
I'm not enabling this. But I don't want to discard this experiment, so
here I am committing this code.
2019-12-06 20:31:32 +01:00
82cfa72897 AppDrawer: Fix clicking on "Folders" when "Folders" is selected
This is a horrible hack, and I should figure out how to make custom
named route transitions work.
2019-12-06 20:30:50 +01:00
0a7f00af7b Stop overwriting the default divider color
It can be configured from the theme if I want it to be different. The
light grey actually seems fine, for now.
2019-12-06 20:12:00 +01:00
4c2285a2cc JournalList: Implement Hero transition
This was especially challenging because of this bug -
https://github.com/flutter/flutter/issues/36220

It's why we need the extra flightShuttleBuilder
2019-12-06 12:32:51 +01:00
0b161a9df4 Transition to Folders page with a fade
It's at the same hierarchy as 'Notes' and we shouldn't have a bottom to
top transition.
2019-12-06 12:11:39 +01:00
a51f8f170f Make Note and NotesFolder ChangeNotifiers
This will allow us for finer grained notifications of when things change
so we don't have to rebuild everything, like we do currently.
2019-12-06 01:22:57 +01:00
b40ee121e8 Bump version number 2019-12-06 00:46:57 +01:00
4869c1bc70 FolderView: Make the icons the accent color 2019-12-05 18:07:49 +01:00
a39ed51abf Divider: Use the theme color 2019-12-05 18:07:40 +01:00
e1140f0589 FolderTreeView: Make the icon bigger 2019-12-05 17:59:49 +01:00