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
Notes: sideshowbarker 2024-07-17 10:42:12 +09:00

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());