An open-source cross-platform alternative to AirDrop
Update cannot_open_file_dialog.dart
TheGB007782f8653c6a23
diff --git a/lib/widget/dialogs/cannot_open_file_dialog.dart b/lib/widget/dialogs/cannot_open_file_dialog.dartindex 1163928a..b098cea7 100644--- a/lib/widget/dialogs/cannot_open_file_dialog.dart+++ b/lib/widget/dialogs/cannot_open_file_dialog.dart@@ -18,10 +18,14 @@ class CannotOpenFileDialog extends StatelessWidget {title: Text(t.dialogs.cannotOpenFile.title),content: Text(t.dialogs.cannotOpenFile.content(file: path)),actions: [- TextButton(- onPressed: () => { filesRef!.removeEntry(fileId!), context.pop() },- child: Text(t.receiveHistoryPage.entryActions.deleteFromHistory),- ),+ if (fileId != null && filesRef != null)+ TextButton(+ onPressed: () {+ filesRef.removeEntry(fileId);+ context.pop();+ },+ child: Text(t.receiveHistoryPage.entryActions.deleteFromHistory),+ ),TextButton(onPressed: () => context.pop(),child: Text(t.general.close),