File tree Expand file tree Collapse file tree 2 files changed +13
-20
lines changed
Expand file tree Collapse file tree 2 files changed +13
-20
lines changed Original file line number Diff line number Diff line change @@ -190,11 +190,6 @@ async function handleSpace(): Promise<void> {
190190 return ;
191191 }
192192
193- if ( Config . mode === "zen" ) {
194- $ ( "#words .word.active" ) . removeClass ( "active" ) ;
195- $ ( "#words" ) . append ( "<div class='word active'></div>" ) ;
196- }
197-
198193 const currentWord : string = TestWords . words . getCurrent ( ) ;
199194
200195 for ( const fb of getActiveFunboxesWithFunction ( "handleSpace" ) ) {
@@ -321,21 +316,14 @@ async function handleSpace(): Promise<void> {
321316 ) {
322317 TimerProgress . update ( ) ;
323318 }
324- if (
325- Config . mode === "time" ||
326- Config . mode === "words" ||
327- Config . mode === "custom" ||
328- Config . mode === "quote"
329- ) {
330- if ( isLastWord ) {
331- awaitingNextWord = true ;
332- Loader . show ( ) ;
333- await TestLogic . addWord ( ) ;
334- Loader . hide ( ) ;
335- awaitingNextWord = false ;
336- } else {
337- void TestLogic . addWord ( ) ;
338- }
319+ if ( isLastWord ) {
320+ awaitingNextWord = true ;
321+ Loader . show ( ) ;
322+ await TestLogic . addWord ( ) ;
323+ Loader . hide ( ) ;
324+ awaitingNextWord = false ;
325+ } else {
326+ void TestLogic . addWord ( ) ;
339327 }
340328 TestUI . updateActiveElement ( ) ;
341329 void Caret . updatePosition ( ) ;
Original file line number Diff line number Diff line change @@ -550,6 +550,11 @@ export function areAllTestWordsGenerated(): boolean {
550550
551551//add word during the test
552552export async function addWord ( ) : Promise < void > {
553+ if ( Config . mode === "zen" ) {
554+ TestUI . appendEmptyWordElement ( ) ;
555+ return ;
556+ }
557+
553558 let bound = 100 ; // how many extra words to aim for AFTER the current word
554559 const funboxToPush = getActiveFunboxes ( )
555560 . find ( ( f ) => f . properties ?. find ( ( fp ) => fp . startsWith ( "toPush" ) ) )
You can’t perform that action at this time.
0 commit comments