Skip to content

Commit

Permalink
Logger didn't react to changed to logging type if the plugin wasn't r…
Browse files Browse the repository at this point in the history
…eloaded
  • Loading branch information
Agrarvolution committed Feb 23, 2024
1 parent 1f159df commit ff6eff1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/js/ltcCorrection.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ $(function () {
function settingHandler() {
if (storeSettings(readSettings())) {
updateSourceInterface();
logger.updateLogVerbosity(settings.logging);
logger.addLog("Settings successfully stored.", Logger.LOG_LEVELS.info);
};
}
Expand Down Expand Up @@ -575,6 +576,7 @@ function readSettings() {
logger.addLog('Reading settings.', Logger.LOG_LEVELS.info);

settings.logging = form[formIds.logging].checked;

settings.searchRecursive = form[formIds.recursion].checked;

settings.ignoreMediaStart = form[formIds.mediaStart].checked;
Expand Down
7 changes: 7 additions & 0 deletions src/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ class Logger {
this.explainer.removeClass('hidden');
}

updateLogVerbosity(verboseLogging) {
this.verboseLogging = verboseLogging;

if (!this.verboseLogging) {
this.hideLog();
}
}
/**
* Hides log area.
*/
Expand Down

0 comments on commit ff6eff1

Please sign in to comment.