remove wasLoaded hack

This commit is contained in:
Matthias Mair 2026-07-02 21:41:06 +02:00
parent b833b34e38
commit a4a18d2e4b
No known key found for this signature in database
GPG Key ID: A593429DDA23B66A
1 changed files with 1 additions and 3 deletions

View File

@ -25,14 +25,12 @@ function PluginSettingGroupItem({
}) {
// Hide the accordion item if there are no settings for this plugin
const [count, setCount] = useState<number>(0);
const [wasLoaded, setWasLoaded] = useState<boolean>(false);
const [doGet, setDoGet] = useState<boolean>(true);
// Callback once the plugin settings have been loaded
const onLoaded = useCallback(
(settings: SettingsStateProps) => {
setCount(settings.getSettingLength());
setWasLoaded(true);
setDoGet(false);
},
[pluginKey]
@ -42,7 +40,7 @@ function PluginSettingGroupItem({
<Accordion.Item
key={`plugin-${pluginKey}`}
value={pluginKey}
hidden={count === 0 && wasLoaded}
hidden={count === 0}
>
<Accordion.Control>
<Group justify='space-between'>