Skip to content

Commit 70331e3

Browse files
committed
Fix importing does not respect current directory
1 parent 5fc3561 commit 70331e3

File tree

7 files changed

+69
-60
lines changed

7 files changed

+69
-60
lines changed

app/lib/dialogs/packs/dialog.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,11 @@ class __PacksListState extends State<_PacksList> {
271271
return Dismissible(
272272
key: ValueKey(('globalpack', metadata.name)),
273273
onDismissed: (direction) async {
274-
setState(() => _globalPacks.removeAt(index));
275274
await _packSystem.deleteFile(file.path);
275+
if (!mounted) return;
276+
setState(() {
277+
_globalPacks.removeAt(index);
278+
});
276279
},
277280
background: Container(color: Colors.red),
278281
child: ContextRegion(
@@ -314,6 +317,7 @@ class __PacksListState extends State<_PacksList> {
314317
child: Text(AppLocalizations.of(context).delete),
315318
onPressed: () async {
316319
await _packSystem.deleteFile(file.path);
320+
if (!mounted) return;
317321
setState(() {
318322
_globalPacks.removeAt(index);
319323
});

app/lib/handlers/pen.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ class PenHandler extends Handler<PenTool> with ColoredHandler {
9090
CameraViewport newViewport,
9191
) async {
9292
if (_submittedElements.isEmpty) return;
93-
_submittedElements.clear();
9493
if (_currentlyBaking) return;
9594
_currentlyBaking = true;
9695
await _bloc?.bake();
97-
_currentlyBaking = false;
9896
await _bloc?.refresh();
97+
_submittedElements.clear();
98+
_currentlyBaking = false;
9999
}
100100

101101
// Add a point to the element.

app/lib/models/defaults.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class DocumentDefaults {
6161
thumbnail: await _createPlainThumnail(color),
6262
backgrounds: [bg],
6363
);
64-
}).toList(),
64+
}),
6565
);
6666
}
6767

app/lib/views/files/view.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,10 @@ class FilesViewState extends State<FilesView> {
642642
'native',
643643
queryParameters: {
644644
'name': 'document.bfly',
645+
'path': AssetLocation(
646+
path: _locationController.text,
647+
remote: _remote?.identifier ?? '',
648+
).identifier,
645649
'type': fileExtension ?? 'note',
646650
},
647651
extra: result,

docs/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@
1515
"@astrojs/starlight": "^0.36.0",
1616
"@phosphor-icons/react": "^2.1.10",
1717
"@types/react": "^19.2.2",
18-
"@types/react-dom": "^19.2.1",
19-
"astro": "^5.14.4",
18+
"@types/react-dom": "^19.2.2",
19+
"astro": "^5.14.5",
2020
"react": "^19.2.0",
2121
"react-dom": "^19.2.0",
2222
"remark-gemoji": "^8.0.0",
2323
"remark-heading-id": "^1.0.1",
2424
"typescript": "^5.9.3"
2525
},
26-
"packageManager": "[email protected].2",
26+
"packageManager": "[email protected].3",
2727
"devDependencies": {
28-
"@vite-pwa/astro": "^1.1.0",
28+
"@vite-pwa/astro": "^1.1.1",
2929
"sass": "^1.93.2",
3030
"sharp": "^0.34.4",
31-
"vite-plugin-pwa": "^1.0.3",
31+
"vite-plugin-pwa": "^1.1.0",
3232
"workbox-window": "^7.3.0"
3333
},
3434
"pnpm": {

docs/pnpm-lock.yaml

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

metadata/en-US/changelogs/152.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* Fix metadata file version not updating if file version is null
1010
* Fix cache settings not editable correctly
1111
* Fix elements are duplicated on creation
12+
* Fix importing does not respect current directory
1213
* Add 16kb page size support for android
1314

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

0 commit comments

Comments
 (0)