Skip to content

Commit

Permalink
Merge pull request #39390 from gijoe0295/gijoe/38833
Browse files Browse the repository at this point in the history
Fix: Task report does not scroll to bottom after editing
  • Loading branch information
madmax330 authored Apr 4, 2024
2 parents 7d59d37 + 04f4d80 commit 4a7be66
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/libs/actions/Task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ function completeTask(taskReport: OnyxEntry<OnyxTypes.Report>) {

playSound(SOUNDS.SUCCESS);
API.write(WRITE_COMMANDS.COMPLETE_TASK, parameters, {optimisticData, successData, failureData});
Report.notifyNewAction(taskReportID, currentUserAccountID);
}

/**
Expand Down Expand Up @@ -427,6 +428,7 @@ function reopenTask(taskReport: OnyxEntry<OnyxTypes.Report>) {
};

API.write(WRITE_COMMANDS.REOPEN_TASK, parameters, {optimisticData, successData, failureData});
Report.notifyNewAction(taskReportID, currentUserAccountID);
}

function editTask(report: OnyxTypes.Report, {title, description}: OnyxTypes.Task) {
Expand Down Expand Up @@ -502,6 +504,7 @@ function editTask(report: OnyxTypes.Report, {title, description}: OnyxTypes.Task
};

API.write(WRITE_COMMANDS.EDIT_TASK, parameters, {optimisticData, successData, failureData});
Report.notifyNewAction(report.reportID, currentUserAccountID);
}

function editTaskAssignee(
Expand Down Expand Up @@ -602,6 +605,7 @@ function editTaskAssignee(
};

API.write(WRITE_COMMANDS.EDIT_TASK_ASSIGNEE, parameters, {optimisticData, successData, failureData});
Report.notifyNewAction(report.reportID, currentUserAccountID);
}

/**
Expand Down Expand Up @@ -946,6 +950,7 @@ function deleteTask(report: OnyxEntry<OnyxTypes.Report>) {
};

API.write(WRITE_COMMANDS.CANCEL_TASK, parameters, {optimisticData, successData, failureData});
Report.notifyNewAction(report.reportID, currentUserAccountID);

if (shouldDeleteTaskReport) {
Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(parentReport?.reportID ?? ''));
Expand Down

0 comments on commit 4a7be66

Please sign in to comment.