Просмотр исходного кода

Do not display the splash screen in the application state plugin

The splash screen is displayed in the theme manager, so displaying it in the state plugin means the splash screen is displayed twice (visually this often appears as the Jupyter moons orbiting, then stopping and starting over again). The state manager does not know if the theme is light or dark, so does not know the right options for displaying the splash screen anyway.
Jason Grout 4 лет назад
Родитель
Сommit
48654f197d
1 измененных файлов с 1 добавлено и 8 удалено
  1. 1 8
      packages/apputils-extension/src/index.ts

+ 1 - 8
packages/apputils-extension/src/index.ts

@@ -308,13 +308,12 @@ const state: JupyterFrontEndPlugin<IStateDB> = {
   autoStart: true,
   provides: IStateDB,
   requires: [JupyterFrontEnd.IPaths, IRouter, ITranslator],
-  optional: [ISplashScreen, IWindowResolver],
+  optional: [IWindowResolver],
   activate: (
     app: JupyterFrontEnd,
     paths: JupyterFrontEnd.IPaths,
     router: IRouter,
     translator: ITranslator,
-    splash: ISplashScreen | null,
     resolver: IWindowResolver | null
   ) => {
     const trans = translator.load('jupyterlab');
@@ -425,11 +424,6 @@ const state: JupyterFrontEndPlugin<IStateDB> = {
           return;
         }
 
-        // If a splash provider exists, launch the splash screen.
-        const loading = splash
-          ? splash.show()
-          : new DisposableDelegate(() => undefined);
-
         // If the state database has already been resolved, resetting is
         // impossible without reloading.
         if (resolved) {
@@ -454,7 +448,6 @@ const state: JupyterFrontEndPlugin<IStateDB> = {
         } else {
           void cleared.then(() => {
             router.navigate(url);
-            loading.dispose();
           });
         }