Skip to content

Commit 7d15aac

Browse files
authored
Merge pull request #53193 from nkdengineer/fix/nkd-52830
fix: remove pinned SelfDM for new users
2 parents 3cc88f5 + a539cc9 commit 7d15aac

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/libs/actions/Report.ts

+20
Original file line numberDiff line numberDiff line change
@@ -3882,6 +3882,26 @@ function prepareOnboardingOptimisticData(
38823882
guidedSetupData.push({type: 'video', ...data.video, ...videoMessage});
38833883
}
38843884

3885+
if (engagementChoice === CONST.ONBOARDING_CHOICES.MANAGE_TEAM) {
3886+
const selfDMReportID = ReportUtils.findSelfDMReportID();
3887+
const selfDMReport = ReportConnection.getReport(selfDMReportID ?? '-1');
3888+
optimisticData.push({
3889+
onyxMethod: Onyx.METHOD.MERGE,
3890+
key: `${ONYXKEYS.COLLECTION.REPORT}${selfDMReportID}`,
3891+
value: {
3892+
isPinned: false,
3893+
},
3894+
});
3895+
3896+
failureData.push({
3897+
onyxMethod: Onyx.METHOD.MERGE,
3898+
key: `${ONYXKEYS.COLLECTION.REPORT}${selfDMReportID}`,
3899+
value: {
3900+
isPinned: selfDMReport?.isPinned,
3901+
},
3902+
});
3903+
}
3904+
38853905
guidedSetupData.push(...tasksForParameters);
38863906

38873907
return {optimisticData, successData, failureData, guidedSetupData, actorAccountID};

0 commit comments

Comments
 (0)