[Update/Refactor]

For data integration correctly, the plugins data (saved, downloaded, fetched) merge whenever update data each of it.
Separate plugins controllers.
This commit is contained in:
Sakamoto Shiina
2025-04-16 19:02:41 +09:00
parent 379ca86b45
commit 4c12e8b946
8 changed files with 268 additions and 175 deletions

View File

@@ -29,9 +29,9 @@ export const App = () => {
const { currentIsBackendReady } = useIsBackendReady();
const { WindowGeometryController } = useWindow();
const { i18n } = useTranslation();
const fetchPluginsHasRunRef = useRef({
const pluginsControllerHasRunRef = useRef({
is_initialized_load_plugin: false,
is_fetched_plugins_info: false,
is_init_fetched_plugins_info: false,
});
return (
@@ -49,7 +49,7 @@ export const App = () => {
{(currentIsBackendReady.data === false || currentIsVrctAvailable.data === false)
? <SplashComponent />
: <Contents key={i18n.language} fetchPluginsHasRunRef={fetchPluginsHasRunRef} />
: <Contents key={i18n.language} pluginsControllerHasRunRef={pluginsControllerHasRunRef} />
}
<SnackbarController />
@@ -58,11 +58,11 @@ export const App = () => {
);
};
const Contents = ({ fetchPluginsHasRunRef }) => {
const Contents = ({ pluginsControllerHasRunRef }) => {
const { currentIsSoftwareUpdating } = useIsSoftwareUpdating();
return (
<>
<PluginsController fetchPluginsHasRunRef={fetchPluginsHasRunRef} />
<PluginsController pluginsControllerHasRunRef={pluginsControllerHasRunRef} />
<WindowTitleBar />
{currentIsSoftwareUpdating.data === false