@zeniai/client-epic-state 4.20.2-beta32RR → 4.20.2-beta33RR

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,9 +22,13 @@ export const bulkUpdateTaskListEpic = (actions$, state$, zeniAPI) => actions$.pi
22
22
  .putAndGetJSON(url, payload)
23
23
  .pipe(mergeMap((response) => {
24
24
  if (isSuccessResponse(response) && response.data != null) {
25
+ const removeFromList = updates.isArchived != null ||
26
+ updates.isDeleted != null ||
27
+ 'snoozedUntil' in updates;
25
28
  return of(updateTasks(response.data.tasks), updateTasksListOnBulkUpdateTasksSuccess({
26
29
  taskIds,
27
30
  groupId,
31
+ removeFromList,
28
32
  }));
29
33
  }
30
34
  else {
@@ -11,6 +11,7 @@ export const dragNDropTasksEpic = (actions$, state$) => actions$.pipe(filter(dra
11
11
  updateTasksListOnBulkUpdateTasksSuccess({
12
12
  taskIds,
13
13
  groupId,
14
+ removeFromList: false,
14
15
  }),
15
16
  bulkUpdateTaskList(taskIds, groupId, updates),
16
17
  ];
@@ -213,12 +213,10 @@ const taskList = createSlice({
213
213
  },
214
214
  },
215
215
  updateTasksListOnBulkUpdateTasksSuccess(draft, action) {
216
- const { taskIds, groupId } = action.payload;
216
+ const { taskIds, groupId, removeFromList } = action.payload;
217
217
  draft.updateTasksFetchState.fetchState = 'Completed';
218
218
  draft.updateTasksFetchState.error = undefined;
219
- if (groupId == null) {
220
- // Tab-changing operations (archive/delete/unarchive/undo-delete/unsnooze):
221
- // Remove affected tasks from the current tab's top-level indices
219
+ if (removeFromList) {
222
220
  removeTaskIdsFromTopLevel(draft, taskIds);
223
221
  }
224
222
  else if (groupId != null) {