Skip to content

Commit 6a8acae

Browse files
committed
Move dispatchSavedSearchRecount() for accessibility
1 parent 09464d7 commit 6a8acae

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

ProcessMaker/Http/Controllers/Api/Actions/Cases/DeleteCase.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -99,20 +99,4 @@ private function getTaskDraftIds(array $tokenIds): array
9999
->pluck('id')
100100
->all();
101101
}
102-
103-
private function dispatchSavedSearchRecount(): void
104-
{
105-
if (!config('savedsearch.count', false)) {
106-
return;
107-
}
108-
109-
$jobClass = 'ProcessMaker\\Package\\SavedSearch\\Jobs\\RecountAllSavedSearches';
110-
if (!class_exists($jobClass)) {
111-
return;
112-
}
113-
114-
DB::afterCommit(static function () use ($jobClass): void {
115-
$jobClass::dispatch(['request', 'task']);
116-
});
117-
}
118102
}

ProcessMaker/Http/Controllers/Api/Actions/Cases/DeletesCaseRecords.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,4 +241,20 @@ private function deleteNotifications(array $requestIds): void
241241
->whereIn('data->type', $notificationTypes)
242242
->delete();
243243
}
244+
245+
private function dispatchSavedSearchRecount(): void
246+
{
247+
if (!config('savedsearch.count', false)) {
248+
return;
249+
}
250+
251+
$jobClass = 'ProcessMaker\\Package\\SavedSearch\\Jobs\\RecountAllSavedSearches';
252+
if (!class_exists($jobClass)) {
253+
return;
254+
}
255+
256+
DB::afterCommit(static function () use ($jobClass): void {
257+
$jobClass::dispatch(['request', 'task']);
258+
});
259+
}
244260
}

0 commit comments

Comments
 (0)