|
|
@ -399,10 +399,8 @@ class _FilesBrowserViewState extends State<FilesBrowserView> { |
|
|
|
case FilesFileAction.sync: |
|
|
|
case FilesFileAction.sync: |
|
|
|
final sizeWarning = widget.bloc.options.downloadSizeWarning.value; |
|
|
|
final sizeWarning = widget.bloc.options.downloadSizeWarning.value; |
|
|
|
if (sizeWarning != null && details.size != null && details.size! > sizeWarning) { |
|
|
|
if (sizeWarning != null && details.size != null && details.size! > sizeWarning) { |
|
|
|
// ignore: use_build_context_synchronously |
|
|
|
|
|
|
|
if (!(await showConfirmationDialog( |
|
|
|
if (!(await showConfirmationDialog( |
|
|
|
context, |
|
|
|
context, |
|
|
|
// ignore: use_build_context_synchronously |
|
|
|
|
|
|
|
AppLocalizations.of(context).downloadConfirmSizeWarning( |
|
|
|
AppLocalizations.of(context).downloadConfirmSizeWarning( |
|
|
|
filesize(sizeWarning), |
|
|
|
filesize(sizeWarning), |
|
|
|
filesize(details.size), |
|
|
|
filesize(details.size), |
|
|
@ -414,13 +412,10 @@ class _FilesBrowserViewState extends State<FilesBrowserView> { |
|
|
|
widget.filesBloc.syncFile(details.path); |
|
|
|
widget.filesBloc.syncFile(details.path); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case FilesFileAction.delete: |
|
|
|
case FilesFileAction.delete: |
|
|
|
// ignore: use_build_context_synchronously |
|
|
|
|
|
|
|
if (await showConfirmationDialog( |
|
|
|
if (await showConfirmationDialog( |
|
|
|
context, |
|
|
|
context, |
|
|
|
details.isDirectory |
|
|
|
details.isDirectory |
|
|
|
// ignore: use_build_context_synchronously |
|
|
|
|
|
|
|
? AppLocalizations.of(context).folderDeleteConfirm(details.name) |
|
|
|
? AppLocalizations.of(context).folderDeleteConfirm(details.name) |
|
|
|
// ignore: use_build_context_synchronously |
|
|
|
|
|
|
|
: AppLocalizations.of(context).fileDeleteConfirm(details.name), |
|
|
|
: AppLocalizations.of(context).fileDeleteConfirm(details.name), |
|
|
|
)) { |
|
|
|
)) { |
|
|
|
widget.filesBloc.delete(details.path); |
|
|
|
widget.filesBloc.delete(details.path); |
|
|
|