Skip to content

[588] Fix export frequency text, migrations and title sort - #589

Merged
maelchiotti merged 7 commits into
v2.3.0from
fix/588_small_fixes
Nov 10, 2026
Merged

maelchiotti merged 7 commits into
v2.3.0from
fix/588_small_fixes

Conversation

@maelchiotti

@maelchiotti maelchiotti commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Closes #588.

Changes

Export frequency of 3 days (268fd93)

settings_auto_export_frequency_value had no 3 case, although 3 days is a slider value (automaticExportFrequenciesValues). The tile showed "Every " with nothing after it. Adds 3{3 days} to app_en.arb. The other languages get it from Crowdin and keep their other case 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:

  1. reads the notes and their labels;
  2. in one writeTxn, removes the old notes, puts the migrated ones and links their labels (_putLabels, same steps as NotesService.putAllLabels, which can't be called inside another transaction).

The v3 migration changes each note's id, and so the isarId its 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.compareTo now compares title.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)

  • Removes PreferenceKey.preferenceSecure. It always threw an ArgumentError (get on a secure key) and was never used.
  • Removes NotesService.putAllLabels, unused since [584] Fix partial backup restore #585 (merged here with 06dc314) and the migration change above.

Checks

`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>
@maelchiotti maelchiotti added bug Something isn't working localization Improvements or additions to localizations labels Nov 10, 2026 — with Claude
@maelchiotti maelchiotti self-assigned this Nov 10, 2026
claude and others added 3 commits November 10, 2026 16:29
Since #585, the backup import links the labels inside
`NotesService.import`, and the migrations now do it in their own
transaction (`_putLabels`), so `NotesService.putAllLabels` is no longer
used anywhere.

Refs #588

Co-Authored-By: Claude <noreply@anthropic.com>
@maelchiotti
maelchiotti merged commit 370e1da into v2.3.0 Nov 10, 2026
5 checks passed
@maelchiotti
maelchiotti deleted the fix/588_small_fixes branch November 10, 2026 16:37

This branch was successfully deployed

1 active deployment
build — b4166e73 Deployed Nov 10, 2026 by maelchiotti via Native libraries #814
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working localization Improvements or additions to localizations

Projects

Development

Successfully merging this pull request may close these issues.

Small fixes: export frequency text, migrations, title sort, dead code

2 participants