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

@@ -317,19 +317,21 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
);
if (suc == null || err != null) return;
final ret = await EditorPage.route.go(
await EditorPage.route.go(
context,
args: EditorPageArgs(path: localPath),
args: EditorPageArgs(
path: localPath,
onSave: (context, _) {
SftpProvider.add(SftpReq(
req.spi,
remotePath,
localPath,
SftpReqType.upload,
));
context.showSnackBar(l10n.added2List);
},
),
);
if (ret?.editExistedOk == true) {
SftpProvider.add(SftpReq(
req.spi,
remotePath,
localPath,
SftpReqType.upload,
));
context.showSnackBar(l10n.added2List);
}
}
void _download(SftpName name) {