Skip to content

Commit

Permalink
fix: fix #228 AliceCallsListPage String? unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
techouse committed Aug 19, 2024
1 parent 1a1ec27 commit db14e24
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class _AliceCallsListPageState extends State<AliceCallsListPage>
/// Called when save to file has been pressed. It saves data to file.
void _saveToFile() async {
final result = await aliceCore.saveCallsToFile(context);
if (result.success) {
if (result.success && result.path != null) {
AliceGeneralDialog.show(
context: context,
title: context.i18n(AliceTranslationKey.saveSuccessTitle),
Expand All @@ -267,7 +267,7 @@ class _AliceCallsListPageState extends State<AliceCallsListPage>
? context.i18n(AliceTranslationKey.saveSuccessView)
: null,
secondButtonAction: () =>
OperatingSystem.isAndroid ? OpenFilex.open(result.path) : null,
OperatingSystem.isAndroid ? OpenFilex.open(result.path!) : null,
);
} else {
final [String title, String description] = switch (result.error) {
Expand Down

0 comments on commit db14e24

Please sign in to comment.