mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2025-05-10 20:45:36 +02:00
fix: Don't show toasts when export cancelled (#2230)
This commit is contained in:
parent
820cd720b5
commit
bd79496433
1 changed files with 8 additions and 4 deletions
|
@ -228,13 +228,15 @@ class SettingsViewModel extends BaseViewModel {
|
|||
if (outFile.existsSync()) {
|
||||
final String dateTime =
|
||||
DateTime.now().toString().replaceAll(' ', '_').split('.').first;
|
||||
await FlutterFileDialog.saveFile(
|
||||
final status = await FlutterFileDialog.saveFile(
|
||||
params: SaveFileDialogParams(
|
||||
sourceFilePath: outFile.path,
|
||||
fileName: 'selected_patches_$dateTime.json',
|
||||
),
|
||||
);
|
||||
_toast.showBottom(t.settingsView.exportedPatches);
|
||||
if (status != null) {
|
||||
_toast.showBottom(t.settingsView.exportedPatches);
|
||||
}
|
||||
} else {
|
||||
_toast.showBottom(t.settingsView.noExportFileFound);
|
||||
}
|
||||
|
@ -279,13 +281,15 @@ class SettingsViewModel extends BaseViewModel {
|
|||
if (outFile.existsSync()) {
|
||||
final String dateTime =
|
||||
DateTime.now().toString().replaceAll(' ', '_').split('.').first;
|
||||
await FlutterFileDialog.saveFile(
|
||||
final status = await FlutterFileDialog.saveFile(
|
||||
params: SaveFileDialogParams(
|
||||
sourceFilePath: outFile.path,
|
||||
fileName: 'keystore_$dateTime.keystore',
|
||||
),
|
||||
);
|
||||
_toast.showBottom(t.settingsView.exportedKeystore);
|
||||
if (status != null) {
|
||||
_toast.showBottom(t.settingsView.exportedKeystore);
|
||||
}
|
||||
} else {
|
||||
_toast.showBottom(t.settingsView.noKeystoreExportFileFound);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue