File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ import { SnapshotResult } from "../constants/default-snapshot";
7676import { WordGenError } from "../utils/word-gen-error" ;
7777import { tryCatch } from "@monkeytype/util/trycatch" ;
7878import { captureException } from "../sentry" ;
79+ import * as Loader from "../elements/loader" ;
7980
8081let failReason = "" ;
8182const koInputVisual = document . getElementById ( "koInputVisual" ) as HTMLElement ;
@@ -410,9 +411,12 @@ export async function init(): Promise<void> {
410411 TestInput . input . resetHistory ( ) ;
411412 TestInput . input . current = "" ;
412413
414+ Loader . show ( ) ;
413415 const { data : language , error } = await tryCatch (
414416 JSONData . getLanguage ( Config . language )
415417 ) ;
418+ Loader . hide ( ) ;
419+
416420 if ( error ) {
417421 Notifications . add (
418422 Misc . createErrorMessage ( error , "Failed to load language" ) ,
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import {
2323 isFunboxActiveWithFunction ,
2424} from "./funbox/list" ;
2525import { WordGenError } from "../utils/word-gen-error" ;
26+ import * as Loader from "../elements/loader" ;
2627
2728function shouldCapitalize ( lastChar : string ) : boolean {
2829 return / [ ? ! . ؟ ] / . test ( lastChar ) ;
@@ -499,10 +500,12 @@ async function getQuoteWordList(
499500 ? "german"
500501 : language . name ;
501502
503+ Loader . show ( ) ;
502504 const quotesCollection = await QuotesController . getQuotes (
503505 languageToGet ,
504506 Config . quoteLength
505507 ) ;
508+ Loader . hide ( ) ;
506509
507510 if ( quotesCollection . length === 0 ) {
508511 UpdateConfig . setMode ( "words" ) ;
You can’t perform that action at this time.
0 commit comments