mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 10:05:32 +00:00
Spreadsheet: Recognize sheets files by mime type, not by file extension
These conditions weren't executed since 933a717f3b
and always showed
a file import/export wizard.
This commit is contained in:
parent
f47bcddb5b
commit
169498f9db
|
@ -292,7 +292,7 @@ Result<void, String> ExportDialog::make_and_run_for(StringView mime, Core::File&
|
|||
|
||||
if (mime == "text/csv") {
|
||||
return export_xsv();
|
||||
} else if (mime == "text/plain" && file.filename().ends_with(".sheets")) {
|
||||
} else if (mime == "application/x-sheets+json") {
|
||||
return export_worksheet();
|
||||
} else {
|
||||
auto page = GUI::WizardPage::construct(
|
||||
|
|
|
@ -245,7 +245,7 @@ Result<NonnullRefPtrVector<Sheet>, String> ImportDialog::make_and_run_for(GUI::W
|
|||
|
||||
if (mime == "text/csv") {
|
||||
return import_xsv();
|
||||
} else if (mime == "text/plain" && file.filename().ends_with(".sheets")) {
|
||||
} else if (mime == "application/x-sheets+json") {
|
||||
return import_worksheet();
|
||||
} else {
|
||||
auto page = GUI::WizardPage::construct(
|
||||
|
|
Loading…
Reference in a new issue