1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

Spreadsheet: Open files using FileSystemAccessClient::try_open_file()

This commit is contained in:
Karol Kosek 2022-05-22 13:24:57 +02:00 committed by Ali Mohammad Pur
parent d877c2fcd6
commit 04443eb847

View file

@ -125,11 +125,7 @@ SpreadsheetWidget::SpreadsheetWidget(GUI::Window& parent_window, NonnullRefPtrVe
if (!request_close())
return;
Optional<String> load_path = GUI::FilePicker::get_open_filepath(window());
if (!load_path.has_value())
return;
auto response = FileSystemAccessClient::Client::the().try_request_file_read_only_approved(window(), *load_path);
auto response = FileSystemAccessClient::Client::the().try_open_file(window());
if (response.is_error())
return;
load_file(*response.value());