Remove unused code in the telemetry preference. (#5356)

This commit is contained in:
Juho Heikka authored and GitHub committed 2022-05-11 07:57:57 -04:00
1 parent 9f25212f45
commit 7a8a734957
2 files changed
-20

No files matched your search

@@ -112,19 +112,6 @@ const allowUntrustedCAs: PreferenceDescription<boolean> = {
},
};
const allowTelemetry: PreferenceDescription<boolean> = {
fromStore(val) {
return val ?? true;
},
toStore(val) {
if (val === true) {
return undefined;
}
return val;
},
};
const allowErrorReporting: PreferenceDescription<boolean> = {
fromStore(val) {
return val ?? true;
@@ -366,7 +353,6 @@ export const DESCRIPTORS = {
terminalTheme,
localeTimezone,
allowUntrustedCAs,
allowTelemetry,
allowErrorReporting,
downloadMirror,
downloadKubectlBinaries,
-6
View File
@@ -46,7 +46,6 @@ export class UserStore extends BaseStore<UserStoreModel> /* implements UserStore
@observable kubeConfigPath = kubeConfigDefaultPath;
@observable seenContexts = observable.set<string>();
@observable newContexts = observable.set<string>();
@observable allowTelemetry: boolean;
@observable allowErrorReporting: boolean;
@observable allowUntrustedCAs: boolean;
@observable colorTheme: string;
@@ -97,11 +96,6 @@ export class UserStore extends BaseStore<UserStoreModel> /* implements UserStore
}
startMainReactions() {
// track telemetry availability
reaction(() => this.allowTelemetry, allowed => {
appEventBus.emit({ name: "telemetry", action: allowed ? "enabled" : "disabled" });
});
// open at system start-up
reaction(() => this.openAtLogin, openAtLogin => {
app.setLoginItemSettings({