<commit_before>import { enable, disable } from "darkreader";

import { AccountStore } from "./store";

let last_dark_mode: boolean | undefined = undefined;
export function init_dark_mode(account_store: AccountStore): void {
  account_store.on("change", () => {
    const dark_mode = account_store.getIn(["other_settings", "dark_mode"]);
    console.log("account store changed", dark_mode);
    if (dark_mode === last_dark_mode) return;
    last_dark_mode = dark_mode;
    if (dark_mode) {
      enable({
        brightness: 100,
        contrast: 90,
        sepia: 10
      });
    } else {
      disable();
    }
  });
}<commit_msg>delete a console.log<commit_after>import { enable, disable } from "darkreader";

import { AccountStore } from "./store";

let last_dark_mode: boolean | undefined = undefined;
export function init_dark_mode(account_store: AccountStore): void {
  account_store.on("change", () => {
    const dark_mode = account_store.getIn(["other_settings", "dark_mode"]);
    if (dark_mode === last_dark_mode) return;
    last_dark_mode = dark_mode;
    if (dark_mode) {
      enable({
        brightness: 100,
        contrast: 90,
        sepia: 10
      });
    } else {
      disable();
    }
  });
}
{'fraction_non_alphanumeric': 0.1342062193126023, 'fraction_numerical': 0.011456628477905073, 'mean_word_length': 3.2912280701754386, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7132168', 'n_tokens_mistral': 395, 'n_tokens_neox': 379, 'n_words': 88}