mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-06-12 12:47:37 +02:00
chore: update cr_file_saver (#668)
Co-authored-by: Ushie <github@ushie.dev>
This commit is contained in:
@ -74,12 +74,8 @@ class SettingsViewModel extends BaseViewModel {
|
||||
if (outFile.existsSync()) {
|
||||
String dateTime =
|
||||
DateTime.now().toString().replaceAll(' ', '_').split('.').first;
|
||||
String tempFilePath =
|
||||
'${outFile.path.substring(0, outFile.path.lastIndexOf('/') + 1)}selected_patches_$dateTime.json';
|
||||
outFile.copySync(tempFilePath);
|
||||
await CRFileSaver.saveFileWithDialog(SaveFileDialogParams(
|
||||
sourceFilePath: tempFilePath, destinationFileName: ''));
|
||||
File(tempFilePath).delete();
|
||||
sourceFilePath: outFile.path, destinationFileName: 'selected_patches_$dateTime.json'));
|
||||
_toast.showBottom('settingsView.exportedPatches');
|
||||
} else {
|
||||
_toast.showBottom('settingsView.noExportFileFound');
|
||||
|
Reference in New Issue
Block a user