Repository navigation
[588] Fix export frequency text, migrations and title sort - #589
Merged
Merged
Conversation
`settings_auto_export_frequency_value` had no `3` case although 3 days is
one of the values of the slider (`automaticExportFrequenciesValues`), so
the tile and the slider label showed "Every " with nothing after it.
Adds `3{3 days}` to the English source. The other languages get it from
Crowdin; until then they keep showing their `other` case.
Refs #588
Co-Authored-By: Claude <noreply@anthropic.com>
The migrations to v2 and v3 removed the notes, then put them back, in separate transactions, and the `clear()` of v2 even ran outside of any transaction. A failure in the middle could lose the notes. Each migration now reads the notes and their labels first, then removes and puts back the notes and their label links in one `writeTxn`. The v3 migration changes the `id` of each note, and with it the `isarId` its label links are stored under, so the links were lost. It now reads the labels before and links them again after (`_putLabels`, which resets the links like `NotesService.putAllLabels`). Refs #588 Co-Authored-By: Claude <noreply@anthropic.com>
`compareTo` compared the titles with `String.compareTo`, so "b" came after "Z". It now compares the lowercase titles, like the sort of the labels. The order of the notes sorted by title changes for the users with titles in mixed case. Refs #588 Co-Authored-By: Claude <noreply@anthropic.com>
`PreferenceKey.preferenceSecure` called `PreferencesWrapper().get`, which throws an `ArgumentError` for a securely stored preference, and it was never used. The secure preferences are read with `preferenceOrDefaultSecure`. Refs #588 Co-Authored-By: Claude <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #588.
Changes
Export frequency of 3 days (268fd93)
settings_auto_export_frequency_valuehad no3case, although 3 days is a slider value (automaticExportFrequenciesValues). The tile showed "Every " with nothing after it. Adds3{3 days}toapp_en.arb. The other languages get it from Crowdin and keep theirothercase until then.Migrations in a single transaction (cd8d8ab)
The migrations to v2 and v3 removed the notes, then put them back, in separate transactions. The
clear()of v2 even ran outside of any transaction. Each migration now:writeTxn, removes the old notes, puts the migrated ones and links their labels (_putLabels, same steps asNotesService.putAllLabels, which can't be called inside another transaction).The v3 migration changes each note's
id, and so theisarIdits label links are stored under: the links were lost. They are now read before and linked again after.This only matters for users updating from very old versions. Not tested on a database of those versions.
Title sort (2ac356e)
Note.compareTonow comparestitle.toLowerCase(), like the labels. Users with mixed-case titles will see a different order: worth a line in the CHANGELOG at release time.Dead code (8e0fdde, 8bc86fe)
PreferenceKey.preferenceSecure. It always threw anArgumentError(geton a secure key) and was never used.NotesService.putAllLabels, unused since [584] Fix partial backup restore #585 (merged here with 06dc314) and the migration change above.Checks
flutter gen-l10n,dart run build_runner build,dart format -l 120(0 changed),dart analyze --fatal-infos(no issues), also after merging [586] Fix stale notes lists after renaming a label #587 and [566] Fix the backup location dialog interfering with shares #590 on top.