900 Commits

Author SHA1 Message Date
313aace7fb JournalListingScreen: Convert to stateful widget
This way we avoid re-sorting the list each time we render it.
2020-02-09 18:56:13 +01:00
2bc1c0aea8 Fix SortedNotes folder and enable it again 2020-02-09 18:53:56 +01:00
57a309a63e SortedNotesFolder: ensure reverse sort 2020-02-09 18:17:14 +01:00
a97bdd8f92 Add a VirtualNotesFolder
Also disable the SortedNotesFolder - it's buggy.

This simplifies using a JournalList as one doesn't need to pick between
a list of notes / notesfolder.
2020-02-09 18:08:57 +01:00
be23f944b7 JournalList: Show the notes sorted
We're using a new SortesNotesFolder class. This way we don't continously
re-sort the notes.

And in the future we will be able to toggle the notes sorting method.
2020-02-09 17:38:51 +01:00
20f8d7f7fe NoteEditor: Improve modified check
If the only modification is the addition of a 'modified' tag, then we
shouldn't count it as modified.

I'm not too fond of this logic.
2020-02-09 17:34:12 +01:00
49192026a7 NotesFolder: Do not allow changes in the folderPath
Otherwise the NotesFolder can reach an inconsistent state.
2020-02-09 17:08:31 +01:00
1741fbf458 GitHub: Use http authentication header
Passing the oauth token via the query parameter has been deprecated and
will be removed on the 1st of July.
2020-02-09 16:32:35 +01:00
cfb2703414 SearchDelegate: Remove it when pressing 'x'
Usually 'x' just clears the query, but if there is no query it is
strange that nothing happens on pressing it.
2020-02-09 16:32:35 +01:00
5ae288a3f6 Remove Flushbar
With a FAB, flushbar's snackbar is just too difficult to press. We're
reverting to the classic Scaffold and making sure we're calling it with
the correct context.

https://github.com/AndreHaueisen/flushbar/issues/64
2020-02-09 16:32:35 +01:00
937d12d5d8 Host Setup: Wrap back button in SafeArea
Otherwise the notch intefers with it.
2020-02-09 16:32:35 +01:00
0c0fd17543 syncNotes: Catch the exception outside the StateContainer
The StateContainer doesn't have access to the snackbar.
2020-02-09 16:32:35 +01:00
8f76b4d960 [Feat] add date to trailing widget in journal listing 2020-02-06 17:03:32 +01:00
3d12c833d3 Revert "Deletes Note.compareTo"
This reverts commit 6cf5454f7940c9aee65279c4635f84b04f9ec700.

Having this compareTo makes testing easier.
2020-02-06 11:52:27 +01:00
6cf5454f79 Deletes Note.compareTo
Notes should no longer have a default comparison method. Since sorting
will soon be configurable (and is currently disabled), lets just remove
this method.
2020-02-06 01:53:16 +01:00
4bfd04fa2d Simplify code 2020-02-06 01:46:46 +01:00
1c8c17fb47 JournalList: Do not show a removal animation if dismissed
Otherwise we show an animation twice, and it is quite jarring.
2020-02-06 01:39:55 +01:00
36543b51d5 Remove unused code 2020-02-06 01:32:55 +01:00
143a1d95c7 First iteration of animating the JournalList
Now on adding / removing elements, the list is animated. It looks
slightly better.
2020-02-06 01:29:30 +01:00
9d29710d59 NotesFolder: Implement more fine grained notifications 2020-02-06 01:28:50 +01:00
55b05926c1 Log why the note was modified
We are getting bug reports about the modified tag being changed even
when the note hasn't been modified.
2020-02-06 00:48:56 +01:00
670a0ff12d Remove NoteFSEntity - It's easier to just keep Notes/Folders separate 2020-02-02 16:02:41 +01:00
2711f1c4c9 Add a NotesFolderNotifier
This also implements the ChangeNotifier, but additional provides more
fine grained notifications. We neeed this in order to animate the list
of notes / folders when they change.
2020-02-01 13:20:29 +01:00
c91abc9010 Bump version 2020-01-31 23:33:16 +01:00
36076f355b Update screenshots 2020-01-31 23:30:53 +01:00
0fd7892e40 Avoid loading all the Notes in one go
This can sometimes lead to too many files being opened in parallel and
then failing because there aren't any file descriptors left. This patch
isn't perfect as given the directory structure we could still be loading
too many in one go, but it's a quick workaround for now.

The proper solution is to only load the Notes which need to be displayed
instead of loading all of them at startup.
2020-01-31 23:25:28 +01:00
82aeb01ba9 JournalList: Replace ListView.seperated with ListView.builder
I wanted to stop using .seperated as it shows some ugly artifacts when
used with IconDismissable when removing an item, and it makes it more
difficult to replace it with an AnimatedListView
2020-01-31 23:07:17 +01:00
8761f96bbe UndoSnackBar: Stop using Fimber
It makes everything far more complicated, but at least this way the FAB
moves along with the scaffold. With Fimber, that is not the case, and it
is very annoying.
2020-01-31 17:41:05 +01:00
f9a2f4c875 Add some FIXMEs 2020-01-31 16:17:30 +01:00
95dce61479 Allow the new folder for notes to be configurable
This is currently disabled as it requires a substantial change in the
JournalList.
2020-01-31 16:16:12 +01:00
51e42780d6 Split NoteSearchDelegate into its own file 2020-01-31 16:12:55 +01:00
23c6192162 Editor: Add 'Discard Changes' button
It got removed while merging the editor/viewer
2020-01-31 15:55:25 +01:00
bded32b027 TodoEditor: Add a 'Add Item' button at the bottom 2020-01-30 19:28:16 +01:00
698e741851 TodoEditor: Only show remove buttons when that item has focus
Looks less cluttered.
2020-01-30 19:26:58 +01:00
a11d535078 TodoEditor: Allow removing todo items 2020-01-30 19:08:07 +01:00
27b630888c TodoEditor: Allow items to be rearranged when dragging 2020-01-30 19:01:41 +01:00
a2b3c8d9e6 Add const 2020-01-30 18:41:51 +01:00
7c2cde03b7 Add the first draft of a TodoEditor
It's a small proof of concept and still needs a lot of work.
2020-01-30 18:41:27 +01:00
ddb7303fea Reduce code duplication between Editors
It also makes it so much easier to implement a new editor.
2020-01-30 17:42:29 +01:00
841e2808db Bump version 2020-01-29 17:20:59 +01:00
ac7881ebeb Remove unused scripts 2020-01-29 17:09:01 +01:00
56fa627de7 moveNote: Do nothing if dest is the current folder 2020-01-29 17:05:21 +01:00
9e520e7e95 FolderSelectionDialog: Make it prettier
We don't need it to have such large icons.
2020-01-29 17:04:18 +01:00
43281bd2bb Add support for moving a Note to another folder
The Folder selection dialog needs a lot of work, but it's a start.
2020-01-29 16:51:57 +01:00
d48461a4cc Revert "android: Remove keeping the screen on in debug mode"
This reverts commit 333b11de7d4e67b0abd7269989609fe58c73c7ab.

We still have the "keep device from sleeping" permission. It seems we
will need to manually remove that permission. I rather have that
permission and have this super useful tool of keeping the screen on when
developing.
2020-01-29 15:30:08 +01:00
7e5c2ba4a3 MarkdownEditor: Open by default in edit mode
This way most notes can immediately be edited without clicking twice -
once to switch editors and once to focus.

In the future, we should preserve the state of the editor from the last
time so that people don't need to continously switch between notes.
2020-01-29 00:04:28 +01:00
db5d2c51e7 RawEditor: Add a FAB 2020-01-29 00:04:28 +01:00
047aac3553 MarkdownEditor: Show a FAB with a checkmark
Instead of a FAB to switch modes.
2020-01-29 00:04:28 +01:00
3f40a2992a Add the concept of Editors
* We no longer have a separate editing and browsing view - This does
mean we loose the ability to quick flip between notes by swiping.
However, this is more how a note editor would behave. I do later want to
add that capability back.

* We have 2 editors for now - Markdown and Raw. By default we use the
Markdown editor which can be toggled between Preview / Edit mode.

I later want to add a rich text editor and a todo editor as well.
2020-01-29 00:04:24 +01:00
127faa39cf JournalEditor: Allow the markdown to be previewed
This is the first implementation of trying to combine the viewer and
editor. It isn't perfect and doesn't work well with the raw editor.
2020-01-28 16:23:00 +01:00