Fix loading state issues for spaces pagination

This commit is contained in:
Michael Telatynski 2021-08-11 17:07:53 +01:00
parent d74e9c4f90
commit 38645d9054

View file

@ -441,7 +441,7 @@ const SpaceHierarchy = ({
let content: JSX.Element; let content: JSX.Element;
let loader: JSX.Element; let loader: JSX.Element;
if (loading) { if (loading && !rooms.length) {
content = <Spinner />; content = <Spinner />;
} else { } else {
let manageButtons; let manageButtons;
@ -558,9 +558,11 @@ const SpaceHierarchy = ({
/> />
</>; </>;
loader = <div ref={loaderRef}> if (hierarchy.canLoadMore) {
<Spinner /> loader = <div ref={loaderRef}>
</div>; <Spinner />
</div>;
}
} else { } else {
results = <div className="mx_SpaceHierarchy_noResults"> results = <div className="mx_SpaceHierarchy_noResults">
<h3>{ _t("No results found") }</h3> <h3>{ _t("No results found") }</h3>