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:
parent
9f25212f45
commit
7a8a734957
@ -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,
|
||||||
|
|||||||
@ -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({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user