1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-16 21:05:30 +03:00

Auto merged - #2618 at Wed, 06 Oct 2021 12:17:10 GMT

Expert mode toggle bugfix and refactoring
This commit is contained in:
J Blackman 2021-10-06 23:17:10 +11:00 committed by GitHub
commit 3feefcb184
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 7 deletions

View file

@ -515,8 +515,8 @@ function startProcess() {
$(expertModeCheckbox).prop('checked', true);
}
$(expertModeCheckbox).change(function () {
const checked = $(this).is(':checked');
$(expertModeCheckbox).on("change", () => {
const checked = $(expertModeCheckbox).is(':checked');
checkSetupAnalytics(function (analyticsService) {
analyticsService.setDimension(analyticsService.DIMENSIONS.CONFIGURATOR_EXPERT_MODE, checked ? 'On' : 'Off');
});
@ -525,8 +525,12 @@ function startProcess() {
updateTabList(FC.FEATURE_CONFIG.features);
}
TuningSliders.setExpertMode(checked);
}).change();
if (GUI.active_tab) {
TABS[GUI.active_tab]?.expertModeChanged?.(checked);
}
});
$(expertModeCheckbox).trigger("change");
});
ConfigStorage.get('cliAutoComplete', function (result) {