Skip to content

Commit 655c154

Browse files
committed
Revert "fix: draftmessage disappear when change priority mode"
This reverts commit 2157ae2.
1 parent c1edbf6 commit 655c154

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/hooks/usePriorityChange.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import usePrevious from './usePrevious';
77

88
function usePriorityMode() {
99
const [priorityMode] = useOnyx(ONYXKEYS.NVP_PRIORITY_MODE, {canBeMissing: true});
10-
const [allReportsWithDraftComments] = useOnyx(ONYXKEYS.NVP_DRAFT_REPORT_COMMENTS, {canBeMissing: true});
10+
const [allReportsWithDraftComments] = useOnyx(ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT, {canBeMissing: true});
1111
const prevPriorityMode = usePrevious(priorityMode);
1212

1313
useEffect(() => {

src/libs/actions/App.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ function getOnyxDataForOpenOrReconnect(
315315
// This ensures that any report with a draft comment is preserved in Onyx even if it doesn’t contain chat history
316316
const reportsWithDraftComments = Object.entries(allReportsWithDraftComments ?? {})
317317
.filter(([, value]) => value !== null)
318-
.map(([key]) => key.replace(ONYXKEYS.NVP_DRAFT_REPORT_COMMENTS, ''))
318+
.map(([key]) => key.replace(ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT, ''))
319319
.map((reportID) => allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`]);
320320

321321
reportsWithDraftComments?.forEach((report) => {

0 commit comments

Comments
 (0)