Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix #228 AliceCallsListPage String? unwrap #229

Merged
merged 2 commits into from
Sep 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,10 @@ class _AliceCallsListPageState extends State<AliceCallsListPage>

/// Called when save to file has been pressed. It saves data to file.
void _saveToFile() async {
if (!mounted) return;
final result = await aliceCore.saveCallsToFile(context);

if (!mounted) return;

if (result.success) {
if (result.success && result.path != null) {
AliceGeneralDialog.show(
context: context,
title: context.i18n(AliceTranslationKey.saveSuccessTitle),
Expand All @@ -270,7 +269,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
Loading