浏览代码

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 年之前
父节点
当前提交
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();
           });
         }