23 Commits

Author SHA1 Message Date
2016793b97 NotesCache: Print logs of how many items are saved / loaded 2020-12-27 10:34:16 +01:00
9499cea164 Remove Settings global
Stop it being a singleton. This means it needs to be passed around a
lot. This sucks, but it's how it should be. I shouldn't be using a
global variable to get around this.

This is needed as Settings will soon become repo specific when we
support multiple repos.

This breaks saving the settings in a file, that feature was toggled off
anyway. It needs to be thought over again.
2020-10-09 00:59:19 +02:00
9d00fdac06 Use import_sorter
flutter pub run import_sorter:main --no-comments

The code feels much cleaner
2020-07-24 12:43:28 +02:00
97812e1501 Convert more prints to logs
This way they will show up in the LogViewer
2020-06-10 13:25:22 +02:00
b9b53f28c4 Log some exceptions are warnings
These aren't really a problem, but it's still interesting to know if
they are happening.
2020-05-31 02:00:00 +02:00
d665981182 Allow Git remote host to be reset
This is quick and dirty way of fixing the problem. It doesn't migrate
the notes from the previous repo and just discards them, so you cannot
move your notes from one repo to another using GitJournal (for now), but
at least its better than having to re-install the app.

Related to #36
2020-05-26 23:53:14 +02:00
87393ac588 NoteCache: Avoid duplicates
This should ideally never happen, but it seems to be occasionally happening
for some reason.
2020-05-14 16:59:03 +02:00
ff2ac647c5 Remove unused imports 2020-04-17 10:33:31 +02:00
6c47016c8b logException: Also log to Sentry 2020-04-17 09:42:19 +02:00
bb0e574495 Abstract out the logging
This way moving away from Fimber will be much easier.
2020-04-04 11:50:57 +02:00
4c73840d43 NotesCache: Increase its size to 20
With the cards view, we see way more notes.
2020-04-04 10:36:08 +02:00
965639e6f2 Add the concept of Folder Settings
This contains the default editor / view / sortingMode / etc. For now the
folder settings are shared among all Folders. But the idea is that we
should be able to set different settings per folder (real or virtual)
2020-03-31 11:16:04 +02:00
5db269c826 NotesCache: Allow for json decoding errors
The file may have gotten corrupted.
2020-03-19 23:44:50 +01:00
b252f037b3 Rename NotesFolder -> NotesFolderFS
And NotesFolderReadOnly to NotesFolder. It just makes more sense this
way as we're now getting more and more different "types" of
NotesFolders.
2020-03-15 02:01:07 +01:00
e1d19fc8c2 Optimize building of the NotesCache 2020-03-05 01:36:58 +01:00
cdd214c102 Let the notesCache be toggleable
It might be the cause of a massive slowdown for one particular user. I'm
still leaving it enabled for now, but I want to be able to easily
disable it.
2020-03-05 01:02:16 +01:00
c65ec96da2 Fix bug when you have less than 10 notes
Fixes #73
2020-03-02 17:37:47 +01:00
3ed246310e Centralize sorting code 2020-03-01 13:50:39 +01:00
7bdcd5dd82 Moving SortingMode into its own file 2020-03-01 13:42:09 +01:00
d50f772468 Only have one SortingMode class
It doesn't make sense to duplicate it.
2020-03-01 13:40:16 +01:00
78d7e6cef0 Integrate the NotesCache
It doesn't make any difference as -

1. The sort order shown our SortedNotesFolder is different
2. Rebuilds of the tree affect everything. Even the elements which
should be in the correct place.
2020-02-28 14:55:52 +01:00
215dfc2cec NotesCache: Add a simple way to build the cache 2020-02-28 14:29:07 +01:00
cbacfa31e3 First attempt of creating a NotesCache
This is just for optimizing the loading of the Notes in the correct
order. I want to avoid the notes appearing and disappearing in a strange
order when loading. It gives a bad first impression.

This cache isn't integrated, it's only half done.
2020-02-28 14:17:37 +01:00