Skip to content

Commit 39ccb57

Browse files
committed
Fix metadata file version not updating if file version is null
1 parent 2396a91 commit 39ccb57

File tree

8 files changed

+25
-23
lines changed

8 files changed

+25
-23
lines changed

api/lib/src/converter/note.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ NoteData noteDataMigrator(Uint8List data, {String? password}) {
2222
NoteData archiveNoteDataMigrator(Archive archive, {String? password}) {
2323
var noteData = NoteData.build(archive, password: password);
2424
var metadata = noteData.getMetadata();
25-
if (metadata != null &&
26-
(metadata.fileVersion ?? kFileVersion) < kFileVersion) {
27-
noteData = _migrate(noteData, metadata);
25+
if (metadata != null) {
26+
if ((metadata.fileVersion ?? kFileVersion) < kFileVersion) {
27+
noteData = _migrate(noteData, metadata);
28+
}
2829
metadata = noteData.getMetadata();
2930
if (metadata != null) {
3031
noteData = noteData.setMetadata(

api/pubspec.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ packages:
55
dependency: transitive
66
description:
77
name: _fe_analyzer_shared
8-
sha256: dd3d2ad434b9510001d089e8de7556d50c834481b9abc2891a0184a8493a19dc
8+
sha256: "0eb33edbbe99a02e73b8bbeb6f2b65972023d902117ee8d1bf0ea1a79f83aa7b"
99
url: "https://pub.dev"
1010
source: hosted
11-
version: "89.0.0"
11+
version: "90.0.0"
1212
analyzer:
1313
dependency: "direct dev"
1414
description:
1515
name: analyzer
16-
sha256: c22b6e7726d1f9e5db58c7251606076a71ca0dbcf76116675edfadbec0c9e875
16+
sha256: "711e3a890bb529bf55f07d73b8706f4b7504ad77e90d2f205626b116c048583f"
1717
url: "https://pub.dev"
1818
source: hosted
19-
version: "8.2.0"
19+
version: "8.3.0"
2020
archive:
2121
dependency: "direct main"
2222
description:
@@ -463,10 +463,10 @@ packages:
463463
dependency: transitive
464464
description:
465465
name: source_gen
466-
sha256: ccf30b0c9fbcd79d8b6f5bfac23199fb354938436f62475e14aea0f29ee0f800
466+
sha256: "9098ab86015c4f1d8af6486b547b11100e73b193e1899015033cb3e14ad20243"
467467
url: "https://pub.dev"
468468
source: hosted
469-
version: "4.0.1"
469+
version: "4.0.2"
470470
source_helper:
471471
dependency: transitive
472472
description:

app/android/Gemfile.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,27 @@ GEM
1111
artifactory (3.0.17)
1212
atomos (0.1.3)
1313
aws-eventstream (1.4.0)
14-
aws-partitions (1.1162.0)
15-
aws-sdk-core (3.232.0)
14+
aws-partitions (1.1172.0)
15+
aws-sdk-core (3.233.0)
1616
aws-eventstream (~> 1, >= 1.3.0)
1717
aws-partitions (~> 1, >= 1.992.0)
1818
aws-sigv4 (~> 1.9)
1919
base64
2020
bigdecimal
2121
jmespath (~> 1, >= 1.6.1)
2222
logger
23-
aws-sdk-kms (1.112.0)
23+
aws-sdk-kms (1.113.0)
2424
aws-sdk-core (~> 3, >= 3.231.0)
2525
aws-sigv4 (~> 1.5)
26-
aws-sdk-s3 (1.199.0)
26+
aws-sdk-s3 (1.199.1)
2727
aws-sdk-core (~> 3, >= 3.231.0)
2828
aws-sdk-kms (~> 1)
2929
aws-sigv4 (~> 1.5)
3030
aws-sigv4 (1.12.1)
3131
aws-eventstream (~> 1, >= 1.0.2)
3232
babosa (1.0.4)
3333
base64 (0.3.0)
34-
bigdecimal (3.2.3)
34+
bigdecimal (3.3.1)
3535
claide (1.1.0)
3636
colored (1.2)
3737
colored2 (3.1.2)
@@ -128,7 +128,7 @@ GEM
128128
google-apis-core (>= 0.15.0, < 2.a)
129129
google-apis-playcustomapp_v1 (0.17.0)
130130
google-apis-core (>= 0.15.0, < 2.a)
131-
google-apis-storage_v1 (0.56.0)
131+
google-apis-storage_v1 (0.57.0)
132132
google-apis-core (>= 0.15.0, < 2.a)
133133
google-cloud-core (1.8.0)
134134
google-cloud-env (>= 1.0, < 3.a)
@@ -161,7 +161,7 @@ GEM
161161
httpclient (2.9.0)
162162
mutex_m
163163
jmespath (1.6.2)
164-
json (2.15.0)
164+
json (2.15.1)
165165
jwt (2.10.2)
166166
base64
167167
logger (1.7.0)

app/defaults/pack.tbfly

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"fileVersion": null,
2+
"fileVersion": 12,
33
"type": "pack",
44
"createdAt": 1678464022475,
5-
"updatedAt": 1687714913347,
5+
"updatedAt": 1760304633656,
66
"name": "Core",
77
"description": "The default core experience of Linwood Butterfly",
88
"author": "LinwoodDev",

app/lib/cubits/settings.freezed.dart

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/lib/cubits/settings.g.dart

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/lib/models/defaults.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,9 @@ class DocumentDefaults {
6666
}
6767

6868
static Future<NoteData> getCorePack() async {
69-
_corePack ??= NoteData.fromData(
69+
return _corePack ??= NoteData.fromData(
7070
Uint8List.sublistView(await rootBundle.load('defaults/pack.tbfly')),
7171
);
72-
return _corePack!;
7372
}
7473

7574
static String translate(String key, Map<String, String> translations) {

metadata/en-US/changelogs/152.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
* Add delayed autosave ([#883](https://github.com/LinwoodDev/Butterfly/issues/883))
2+
* Add save state as tooltip
23
* Improve memory usage and performance for importing large assets ([#917](https://github.com/LinwoodDev/Butterfly/issues/917))
34
* Fix bfly files cannot be imported into existing documents
45
* Fix various memory leaks ([#925](https://github.com/LinwoodDev/Butterfly/issues/925))
56
* Fix header text color on certain themes
67
* Fix theme names not displaying correctly in personalization settings
8+
* Fix metadata file version not updating if file version is null
79

810
Read more here: https://linwood.dev/butterfly/2.4.1-rc.0

0 commit comments

Comments
 (0)