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

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

This commit is contained in:
Juho Heikka 2022-05-11 14:57:57 +03:00 committed by GitHub
parent 9f25212f45
commit 7a8a734957
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 20 deletions

View File

@ -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> = { const allowErrorReporting: PreferenceDescription<boolean> = {
fromStore(val) { fromStore(val) {
return val ?? true; return val ?? true;
@ -366,7 +353,6 @@ export const DESCRIPTORS = {
terminalTheme, terminalTheme,
localeTimezone, localeTimezone,
allowUntrustedCAs, allowUntrustedCAs,
allowTelemetry,
allowErrorReporting, allowErrorReporting,
downloadMirror, downloadMirror,
downloadKubectlBinaries, downloadKubectlBinaries,

View File

@ -46,7 +46,6 @@ export class UserStore extends BaseStore<UserStoreModel> /* implements UserStore
@observable kubeConfigPath = kubeConfigDefaultPath; @observable kubeConfigPath = kubeConfigDefaultPath;
@observable seenContexts = observable.set<string>(); @observable seenContexts = observable.set<string>();
@observable newContexts = observable.set<string>(); @observable newContexts = observable.set<string>();
@observable allowTelemetry: boolean;
@observable allowErrorReporting: boolean; @observable allowErrorReporting: boolean;
@observable allowUntrustedCAs: boolean; @observable allowUntrustedCAs: boolean;
@observable colorTheme: string; @observable colorTheme: string;
@ -97,11 +96,6 @@ export class UserStore extends BaseStore<UserStoreModel> /* implements UserStore
} }
startMainReactions() { startMainReactions() {
// track telemetry availability
reaction(() => this.allowTelemetry, allowed => {
appEventBus.emit({ name: "telemetry", action: allowed ? "enabled" : "disabled" });
});
// open at system start-up // open at system start-up
reaction(() => this.openAtLogin, openAtLogin => { reaction(() => this.openAtLogin, openAtLogin => {
app.setLoginItemSettings({ app.setLoginItemSettings({