mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-12 23:20:25 +08:00
fixed layout fluid causing a lot of config saves
This commit is contained in:
parent
b3f2aa544c
commit
9e6728dbed
1 changed files with 4 additions and 14 deletions
|
@ -44,8 +44,8 @@ export function start() {
|
|||
const layouts = Config.customLayoutfluid
|
||||
? Config.customLayoutfluid.split("#")
|
||||
: ["qwerty", "dvorak", "colemak"];
|
||||
console.log(Config.customLayoutfluid);
|
||||
console.log(layouts);
|
||||
// console.log(Config.customLayoutfluid);
|
||||
// console.log(layouts);
|
||||
const numLayouts = layouts.length;
|
||||
let index = 0;
|
||||
index = Math.floor(time / (Config.time / numLayouts));
|
||||
|
@ -71,19 +71,9 @@ export function start() {
|
|||
|
||||
if (Config.layout !== layouts[index] && layouts[index] !== undefined) {
|
||||
Notifications.add(`--- !!! ${layouts[index]} !!! ---`, 0);
|
||||
UpdateConfig.setLayout(layouts[index], true);
|
||||
UpdateConfig.setKeymapLayout(layouts[index], true);
|
||||
}
|
||||
UpdateConfig.setLayout(layouts[index]);
|
||||
UpdateConfig.setKeymapLayout(layouts[index]);
|
||||
Keymap.highlightKey(
|
||||
TestLogic.words
|
||||
.getCurrent()
|
||||
.substring(
|
||||
TestLogic.input.current.length,
|
||||
TestLogic.input.current.length + 1
|
||||
)
|
||||
.toString()
|
||||
.toUpperCase()
|
||||
);
|
||||
}
|
||||
|
||||
TestStats.pushKeypressesToHistory();
|
||||
|
|
Loading…
Reference in a new issue