@@ -8,7 +8,10 @@ import type { FaSolidIcon } from "../../types/font-awesome";
88import { setConfig } from "../../config/setters" ;
99import { Config } from "../../config/store" ;
1010import { restartTestEvent } from "../../events/test" ;
11- import * as CustomTextState from "../../legacy-states/custom-text-name" ;
11+ import {
12+ getCustomTextIndicator ,
13+ setCustomTextIndicator ,
14+ } from "../../states/core" ;
1215import { hideModalAndClearChain , showModal } from "../../states/modals" ;
1316import {
1417 showNoticeNotification ,
@@ -276,7 +279,7 @@ export function CustomTextModal(): JSXElement {
276279 } ) ;
277280 } ) ;
278281
279- setLongTextWarning ( CustomTextState . isCustomTextLong ( ) ?? false ) ;
282+ setLongTextWarning ( getCustomTextIndicator ( ) ?. isLong ?? false ) ;
280283 setChallengeWarning ( getLoadedChallenge ( ) !== null ) ;
281284 } ;
282285
@@ -285,8 +288,8 @@ export function CustomTextModal(): JSXElement {
285288 if ( data === null ) return ;
286289 setIncomingChainedData ( null ) ;
287290
288- if ( data . long !== true && CustomTextState . isCustomTextLong ( ) ) {
289- CustomTextState . setCustomTextName ( "" , undefined ) ;
291+ if ( data . long !== true && getCustomTextIndicator ( ) ?. isLong ) {
292+ setCustomTextIndicator ( undefined ) ;
290293 showNoticeNotification ( "Disabled long custom text progress tracking" , {
291294 durationMs : 5000 ,
292295 } ) ;
@@ -358,11 +361,8 @@ export function CustomTextModal(): JSXElement {
358361 if ( e . code === "Enter" && e . ctrlKey ) {
359362 void form . handleSubmit ( ) ;
360363 }
361- if (
362- CustomTextState . isCustomTextLong ( ) &&
363- CustomTextState . getCustomTextName ( ) !== ""
364- ) {
365- CustomTextState . setCustomTextName ( "" , undefined ) ;
364+ if ( getCustomTextIndicator ( ) ?. isLong ) {
365+ setCustomTextIndicator ( undefined ) ;
366366 setLongTextWarning ( false ) ;
367367 showNoticeNotification ( "Disabled long custom text progress tracking" , {
368368 durationMs : 5000 ,
0 commit comments