@@ -19,7 +19,6 @@ import useRootNavigationState from '@hooks/useRootNavigationState';
1919import useScrollEventEmitter from '@hooks/useScrollEventEmitter' ;
2020import useTheme from '@hooks/useTheme' ;
2121import useThemeStyles from '@hooks/useThemeStyles' ;
22- import { isValidDraftComment } from '@libs/DraftCommentUtils' ;
2322import getPlatform from '@libs/getPlatform' ;
2423import Log from '@libs/Log' ;
2524import { getIOUReportIDOfLastAction , getLastMessageTextForReport } from '@libs/OptionsListUtils' ;
@@ -53,7 +52,7 @@ function LHNOptionsList({style, contentContainerStyles, data, onSelectRow, optio
5352 const [ policy ] = useOnyx ( ONYXKEYS . COLLECTION . POLICY , { canBeMissing : false } ) ;
5453 const [ personalDetails ] = useOnyx ( ONYXKEYS . PERSONAL_DETAILS_LIST , { canBeMissing : true } ) ;
5554 const [ transactions ] = useOnyx ( ONYXKEYS . COLLECTION . TRANSACTION , { canBeMissing : false } ) ;
56- const [ draftComments ] = useOnyx ( ONYXKEYS . COLLECTION . REPORT_DRAFT_COMMENT , { canBeMissing : false } ) ;
55+ const [ draftComments ] = useOnyx ( ONYXKEYS . NVP_DRAFT_REPORT_COMMENTS , { canBeMissing : true } ) ;
5756 const [ transactionViolations ] = useOnyx ( ONYXKEYS . COLLECTION . TRANSACTION_VIOLATIONS , { canBeMissing : false } ) ;
5857 const [ dismissedProductTraining , dismissedProductTrainingMetadata ] = useOnyx ( ONYXKEYS . NVP_DISMISSED_PRODUCT_TRAINING , { canBeMissing : true } ) ;
5958 const [ activePolicyID ] = useOnyx ( ONYXKEYS . NVP_ACTIVE_POLICY_ID , { canBeMissing : true } ) ;
@@ -189,7 +188,7 @@ function LHNOptionsList({style, contentContainerStyles, data, onSelectRow, optio
189188 ? ( getOriginalMessage ( itemParentReportAction ) ?. IOUTransactionID ?? CONST . DEFAULT_NUMBER_ID )
190189 : CONST . DEFAULT_NUMBER_ID ;
191190 const itemTransaction = transactions ?. [ `${ ONYXKEYS . COLLECTION . TRANSACTION } ${ transactionID } ` ] ;
192- const hasDraftComment = isValidDraftComment ( draftComments ?. [ ` ${ ONYXKEYS . COLLECTION . REPORT_DRAFT_COMMENT } ${ reportID } ` ] ) ;
191+ const hasDraftComment = ! ! draftComments ?. [ reportID ] ;
193192
194193 const isReportArchived = ! ! itemReportNameValuePairs ?. private_isArchived ;
195194 const canUserPerformWrite = canUserPerformWriteAction ( item , isReportArchived ) ;
@@ -288,7 +287,6 @@ function LHNOptionsList({style, contentContainerStyles, data, onSelectRow, optio
288287 policy ,
289288 personalDetails ,
290289 data . length ,
291- draftComments ,
292290 optionMode ,
293291 preferredLocale ,
294292 transactions ,
@@ -305,7 +303,6 @@ function LHNOptionsList({style, contentContainerStyles, data, onSelectRow, optio
305303 policy ,
306304 personalDetails ,
307305 data . length ,
308- draftComments ,
309306 optionMode ,
310307 preferredLocale ,
311308 transactions ,
0 commit comments