opt.: close after saving (#684)

This commit is contained in:
lollipopkit🏳️‍⚧️
2025-01-29 15:10:50 +08:00
committed by GitHub
parent dbbb10364b
commit 9e5babec76
31 changed files with 181 additions and 65 deletions

View File

@@ -217,14 +217,17 @@ class _LocalFilePageState extends State<LocalFilePage>
);
return;
}
final ret = await EditorPage.route.go(
await EditorPage.route.go(
context,
args: EditorPageArgs(path: file.absolute.path),
args: EditorPageArgs(
path: file.absolute.path,
onSave: (context, _) {
context.showSnackBar(l10n.saved);
setState(() {});
},
),
);
if (ret?.editExistedOk == true) {
context.showSnackBar(l10n.saved);
setState(() {});
}
},
),
Btn.tile(