Skip to content

Commit

Permalink
Merge pull request #53193 from nkdengineer/fix/nkd-52830
Browse files Browse the repository at this point in the history
fix: remove pinned SelfDM for new users
  • Loading branch information
MonilBhavsar authored Dec 2, 2024
2 parents 3cc88f5 a539cc9 commit 7d15aac
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3882,6 3882,26 @@ function prepareOnboardingOptimisticData(
guidedSetupData.push({type: 'video', ...data.video, ...videoMessage});
}

if (engagementChoice === CONST.ONBOARDING_CHOICES.MANAGE_TEAM) {
const selfDMReportID = ReportUtils.findSelfDMReportID();
const selfDMReport = ReportConnection.getReport(selfDMReportID ?? '-1');
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${selfDMReportID}`,
value: {
isPinned: false,
},
});

failureData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${selfDMReportID}`,
value: {
isPinned: selfDMReport?.isPinned,
},
});
}

guidedSetupData.push(...tasksForParameters);

return {optimisticData, successData, failureData, guidedSetupData, actorAccountID};
Expand Down

0 comments on commit 7d15aac

Please sign in to comment.