print better errors in the search view instead of a blocking modal (#29724)

* print better errors in the search view instead of a blocking modal

* update tests and i18n

* fix unused variable

* fix unused variable again
This commit is contained in:
Julien CLEMENT
2025-04-14 13:36:34 +00:00
committed by GitHub
parent 7ce0a76414
commit 475e449e81
6 changed files with 24 additions and 22 deletions
+2 -1
View File
@@ -1716,11 +1716,12 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
this.onSearch(this.state.search?.term ?? "", scope);
};
private onSearchUpdate = (inProgress: boolean, searchResults: ISearchResults | null): void => {
private onSearchUpdate = (inProgress: boolean, searchResults: ISearchResults | null, error: Error | null): void => {
this.setState({
search: {
...this.state.search!,
count: searchResults?.count,
error: error ?? undefined,
inProgress,
},
});