mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
Spreadsheet: Open files using FileSystemAccessClient::try_open_file()
This commit is contained in:
committed by
Ali Mohammad Pur
parent
d877c2fcd6
commit
04443eb847
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user