diff --git a/app/lib/services/import.dart b/app/lib/services/import.dart index 93f22afb8c85..2eb954b26c8e 100644 --- a/app/lib/services/import.dart +++ b/app/lib/services/import.dart @@ -231,6 +231,7 @@ class ImportService { builder: (context) => NameDialog( title: AppLocalizations.of(context).password, button: AppLocalizations.of(context).open, + obscureText: true, ), ); if (password == null) return null; diff --git a/app/lib/views/main.dart b/app/lib/views/main.dart index 44286422cf9b..ba7fdd802e17 100644 --- a/app/lib/views/main.dart +++ b/app/lib/views/main.dart @@ -25,6 +25,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; +import 'package:go_router/go_router.dart'; import 'package:lw_file_system/lw_file_system.dart'; import 'package:material_leap/material_leap.dart'; import 'package:phosphor_flutter/phosphor_flutter.dart'; @@ -188,6 +189,10 @@ class _ProjectPageState extends State { document ??= await globalImportService.load( type: widget.type.isEmpty ? (fileType ?? widget.type) : widget.type, data: data); + if (document == null) { + GoRouter.of(context).pop(); + return; + } } final name = absolute ? location!.fileName : ''; NoteData? defaultDocument;