mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Synchronize initial values of sync boxes when window starts
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
11 files changed
+213
-37
No files matched your search
@@ -13,7 +13,7 @@ export type ApplicationUpdateStatusEventId =
|
||||
| "download-for-update-failed";
|
||||
|
||||
export interface ApplicationUpdateStatusChannelMessage { eventId: ApplicationUpdateStatusEventId; version?: string }
|
||||
export type ApplicationUpdateStatusChannel = Channel<ApplicationUpdateStatusChannelMessage>;
|
||||
export type ApplicationUpdateStatusChannel = Channel<ApplicationUpdateStatusChannelMessage, never>;
|
||||
|
||||
const applicationUpdateStatusChannelInjectable = getInjectable({
|
||||
id: "application-update-status-channel",
|
||||
|
||||
+3
@@ -5,6 +5,7 @@
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import createSyncBoxInjectable from "../../sync-box/create-sync-box.injectable";
|
||||
import type { UpdateChannel } from "../update-channels";
|
||||
import { syncBoxInjectionToken } from "../../sync-box/sync-box-injection-token";
|
||||
|
||||
const discoveredUpdateVersionInjectable = getInjectable({
|
||||
id: "discovered-update-version",
|
||||
@@ -16,6 +17,8 @@ const discoveredUpdateVersionInjectable = getInjectable({
|
||||
"discovered-update-version",
|
||||
);
|
||||
},
|
||||
|
||||
injectionToken: syncBoxInjectionToken,
|
||||
});
|
||||
|
||||
export default discoveredUpdateVersionInjectable;
|
||||
+3
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import createSyncBoxInjectable from "../../sync-box/create-sync-box.injectable";
|
||||
import { syncBoxInjectionToken } from "../../sync-box/sync-box-injection-token";
|
||||
|
||||
const progressOfUpdateDownloadInjectable = getInjectable({
|
||||
id: "progress-of-update-download-state",
|
||||
@@ -13,6 +14,8 @@ const progressOfUpdateDownloadInjectable = getInjectable({
|
||||
|
||||
return createSyncBox<number>("progress-of-update-download");
|
||||
},
|
||||
|
||||
injectionToken: syncBoxInjectionToken,
|
||||
});
|
||||
|
||||
export default progressOfUpdateDownloadInjectable;
|
||||
+3
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import createSyncBoxInjectable from "../../sync-box/create-sync-box.injectable";
|
||||
import { syncBoxInjectionToken } from "../../sync-box/sync-box-injection-token";
|
||||
|
||||
const updateIsBeingDownloadedInjectable = getInjectable({
|
||||
id: "update-is-being-downloaded",
|
||||
@@ -13,6 +14,8 @@ const updateIsBeingDownloadedInjectable = getInjectable({
|
||||
|
||||
return createSyncBox<boolean>("update-is-being-downloaded");
|
||||
},
|
||||
|
||||
injectionToken: syncBoxInjectionToken,
|
||||
});
|
||||
|
||||
export default updateIsBeingDownloadedInjectable;
|
||||
+3
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import createSyncBoxInjectable from "../../sync-box/create-sync-box.injectable";
|
||||
import { syncBoxInjectionToken } from "../../sync-box/sync-box-injection-token";
|
||||
|
||||
const updatesAreBeingDiscoveredInjectable = getInjectable({
|
||||
id: "updates-are-being-discovered",
|
||||
@@ -13,6 +14,8 @@ const updatesAreBeingDiscoveredInjectable = getInjectable({
|
||||
|
||||
return createSyncBox<boolean>("updates-are-being-discovered");
|
||||
},
|
||||
|
||||
injectionToken: syncBoxInjectionToken,
|
||||
});
|
||||
|
||||
export default updatesAreBeingDiscoveredInjectable;
|
||||
Reference in new issue
Block a user