Fix for broken layout when layout is not defined

This commit is contained in:
Denis Papec 2023-09-15 08:58:47 +01:00
parent 2d8160512f
commit 72baf1db82
No known key found for this signature in database
GPG Key ID: DE0912C69A47222C

View File

@ -261,8 +261,10 @@ function Home({ initialSettings }) {
(groupName) => services?.find(g => g.name === groupName) ?? bookmarks?.find(b => b.name === groupName)
).filter(tabGroupFilter);
if (!settings.layout || !layoutGroups) {
// wait for settings to populate, otherwise all the widgets will be requested initially even if we are on a single tab
if ((!settings.layout || !layoutGroups) &&
JSON.stringify(settings.layout ?? {}) !== JSON.stringify(initialSettings.layout ?? {})
) {
// wait for settings to populate (if different from initial settings), otherwise all the widgets will be requested initially even if we are on a single tab
return <div />;
}
@ -329,7 +331,8 @@ function Home({ initialSettings }) {
settings.layout,
settings.fiveColumns,
settings.disableCollapse,
settings.cardBlur
settings.cardBlur,
initialSettings.layout
]);
return (