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

Fix init timing for DefaultUpdateChannel

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-09-19 10:53:08 -04:00
parent e385e8bbc1
commit 27e2915cb3
4 changed files with 6 additions and 6 deletions

View File

@ -8,7 +8,7 @@ import { updateChannels } from "../update-channels";
const defaultUpdateChannelInjectable = createInitializableState({
id: "default-update-channel",
init: (di) => updateChannels[di.inject(releaseChannelInjectable)],
init: (di) => updateChannels[di.inject(releaseChannelInjectable).get()],
});
export default defaultUpdateChannelInjectable;

View File

@ -16,7 +16,7 @@ const updateCanBeDowngradedInjectable = getInjectable({
return computed(() => (
selectedUpdateChannel.value.get().id === "latest"
&& releaseChannel !== "latest"
&& releaseChannel.get() !== "latest"
));
},
});

View File

@ -4,8 +4,8 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import defaultUpdateChannelInjectable from "../../../common/application-update/selected-update-channel/default-update-channel.injectable";
import initSemanticBuildVersionInjectable from "../../../renderer/vars/semantic-build-version/init.injectable";
import { beforeApplicationIsLoadingInjectionToken } from "../../start-main-application/runnable-tokens/before-application-is-loading-injection-token";
import initReleaseChannelInjectable from "../release-channel/init.injectable";
const initDefaultUpdateChannelInjectableInjectable = getInjectable({
id: "init-default-update-channel-injectable",
@ -14,7 +14,7 @@ const initDefaultUpdateChannelInjectableInjectable = getInjectable({
return {
run: () => defaultUpdateChannel.init(),
runAfter: di.inject(initSemanticBuildVersionInjectable),
runAfter: di.inject(initReleaseChannelInjectable),
};
},
injectionToken: beforeApplicationIsLoadingInjectionToken,

View File

@ -4,8 +4,8 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import defaultUpdateChannelInjectable from "../../../common/application-update/selected-update-channel/default-update-channel.injectable";
import initSemanticBuildVersionInjectable from "../../../renderer/vars/semantic-build-version/init.injectable";
import { beforeFrameStartsInjectionToken } from "../../before-frame-starts/before-frame-starts-injection-token";
import initReleaseChannelInjectable from "../release-channel/init.injectable";
const initDefaultUpdateChannelInjectableInjectable = getInjectable({
id: "init-default-update-channel-injectable",
@ -14,7 +14,7 @@ const initDefaultUpdateChannelInjectableInjectable = getInjectable({
return {
run: () => defaultUpdateChannel.init(),
runAfter: di.inject(initSemanticBuildVersionInjectable),
runAfter: di.inject(initReleaseChannelInjectable),
};
},
injectionToken: beforeFrameStartsInjectionToken,