1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Tweak name of the splash window for loading to avoid confusion with similarly named phenomenon

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2022-05-05 10:16:21 +03:00
parent 37e600cba9
commit 8f27110930
No known key found for this signature in database
GPG Key ID: 8C6CFB2FFFE8F68A
3 changed files with 12 additions and 13 deletions

View File

@ -3,8 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import applicationIsLoadingWindowInjectable import splashWindowInjectable from "./splash-window/splash-window.injectable";
from "./application-is-loading-window/application-is-loading-window.injectable";
import applicationWindowInjectable from "./application-window/application-window.injectable"; import applicationWindowInjectable from "./application-window/application-window.injectable";
const showApplicationWindowInjectable = getInjectable({ const showApplicationWindowInjectable = getInjectable({
@ -13,8 +12,8 @@ const showApplicationWindowInjectable = getInjectable({
instantiate: (di) => { instantiate: (di) => {
const applicationWindow = di.inject(applicationWindowInjectable); const applicationWindow = di.inject(applicationWindowInjectable);
const applicationIsLoadingWindow = di.inject( const splashWindow = di.inject(
applicationIsLoadingWindowInjectable, splashWindowInjectable,
); );
return async () => { return async () => {
@ -22,11 +21,11 @@ const showApplicationWindowInjectable = getInjectable({
return; return;
} }
await applicationIsLoadingWindow.show(); await splashWindow.show();
await applicationWindow.show(); await applicationWindow.show();
applicationIsLoadingWindow.close(); splashWindow.close();
}; };
}, },
}); });

View File

@ -6,8 +6,8 @@ import { getInjectable } from "@ogre-tools/injectable";
import { lensWindowInjectionToken } from "../application-window/lens-window-injection-token"; import { lensWindowInjectionToken } from "../application-window/lens-window-injection-token";
import createLensWindowInjectable from "../application-window/create-lens-window.injectable"; import createLensWindowInjectable from "../application-window/create-lens-window.injectable";
const applicationIsLoadingWindowInjectable = getInjectable({ const splashWindowInjectable = getInjectable({
id: "application-is-loading-window", id: "splash-window",
instantiate: (di) => { instantiate: (di) => {
const createLensWindow = di.inject(createLensWindowInjectable); const createLensWindow = di.inject(createLensWindowInjectable);
@ -27,4 +27,4 @@ const applicationIsLoadingWindowInjectable = getInjectable({
injectionToken: lensWindowInjectionToken, injectionToken: lensWindowInjectionToken,
}); });
export default applicationIsLoadingWindowInjectable; export default splashWindowInjectable;

View File

@ -10,7 +10,7 @@ import { beforeElectronIsReadyInjectionToken } from "./runnable-tokens/before-el
import { beforeApplicationIsLoadingInjectionToken } from "./runnable-tokens/before-application-is-loading-injection-token"; import { beforeApplicationIsLoadingInjectionToken } from "./runnable-tokens/before-application-is-loading-injection-token";
import { onLoadOfApplicationInjectionToken } from "./runnable-tokens/on-load-of-application-injection-token"; import { onLoadOfApplicationInjectionToken } from "./runnable-tokens/on-load-of-application-injection-token";
import { afterApplicationIsLoadedInjectionToken } from "./runnable-tokens/after-application-is-loaded-injection-token"; import { afterApplicationIsLoadedInjectionToken } from "./runnable-tokens/after-application-is-loaded-injection-token";
import applicationIsLoadingWindowInjectable from "./lens-window/application-is-loading-window/application-is-loading-window.injectable"; import splashWindowInjectable from "./lens-window/splash-window/splash-window.injectable";
import applicationWindowInjectable from "./lens-window/application-window/application-window.injectable"; import applicationWindowInjectable from "./lens-window/application-window/application-window.injectable";
import shouldStartHiddenInjectable from "../electron-app/features/should-start-hidden.injectable"; import shouldStartHiddenInjectable from "../electron-app/features/should-start-hidden.injectable";
@ -28,7 +28,7 @@ const startMainApplicationInjectable = getInjectable({
const runManySync = runManySyncFor(di); const runManySync = runManySyncFor(di);
const waitForElectronToBeReady = di.inject(waitForElectronToBeReadyInjectable); const waitForElectronToBeReady = di.inject(waitForElectronToBeReadyInjectable);
const applicationWindow = di.inject(applicationWindowInjectable); const applicationWindow = di.inject(applicationWindowInjectable);
const applicationIsLoadingWindow = di.inject(applicationIsLoadingWindowInjectable); const splashWindow = di.inject(splashWindowInjectable);
const shouldStartHidden = di.inject(shouldStartHiddenInjectable); const shouldStartHidden = di.inject(shouldStartHiddenInjectable);
const openDeepLink = di.inject(openDeepLinkInjectable); const openDeepLink = di.inject(openDeepLinkInjectable);
const commandLineArguments = di.inject(commandLineArgumentsInjectable); const commandLineArguments = di.inject(commandLineArgumentsInjectable);
@ -48,7 +48,7 @@ const startMainApplicationInjectable = getInjectable({
await beforeApplicationIsLoading(); await beforeApplicationIsLoading();
if (!shouldStartHidden) { if (!shouldStartHidden) {
await applicationIsLoadingWindow.show(); await splashWindow.show();
} }
await onLoadOfApplication(); await onLoadOfApplication();
@ -62,7 +62,7 @@ const startMainApplicationInjectable = getInjectable({
await applicationWindow.show(); await applicationWindow.show();
} }
applicationIsLoadingWindow.close(); splashWindow.close();
} }
await afterApplicationIsLoaded(); await afterApplicationIsLoaded();