diff --git a/src/app/Archives/AllArchivedRecordingsTable.tsx b/src/app/Archives/AllArchivedRecordingsTable.tsx index 25c367db9..c567a39cc 100644 --- a/src/app/Archives/AllArchivedRecordingsTable.tsx +++ b/src/app/Archives/AllArchivedRecordingsTable.tsx @@ -157,6 +157,14 @@ export const AllArchivedRecordingsTable: React.FunctionComponent { + addSubscription( + context.notificationChannel.messages(NotificationCategory.ArchivedRecordingCreated).subscribe((v) => { + refreshDirectoriesAndCounts(); + }) + ); + }, [addSubscription, context.notificationChannel, refreshDirectoriesAndCounts]); + React.useEffect(() => { addSubscription( context.notificationChannel.messages(NotificationCategory.ArchivedRecordingDeleted).subscribe((v) => { diff --git a/src/test/Archives/AllArchivedRecordingsTable.test.tsx b/src/test/Archives/AllArchivedRecordingsTable.test.tsx index f48edff80..f1432e9b1 100644 --- a/src/test/Archives/AllArchivedRecordingsTable.test.tsx +++ b/src/test/Archives/AllArchivedRecordingsTable.test.tsx @@ -141,25 +141,30 @@ jest jest .spyOn(defaultServices.notificationChannel, 'messages') - .mockReturnValueOnce(of()) // renders correctly - .mockReturnValueOnce(of()) - .mockReturnValueOnce(of()) + .mockReturnValueOnce(of()) // renders correctly // NotificationCategory.RecordingMetadataUpdated + .mockReturnValueOnce(of()) // NotificationCategory.ActiveRecordingSaved + .mockReturnValueOnce(of()) // NotificationCategory.ArchivedRecordingCreated + .mockReturnValueOnce(of()) // NotificationCategory.ArchivedRecordingDeleted .mockReturnValueOnce(of()) // shows no recordings when empty .mockReturnValueOnce(of()) .mockReturnValueOnce(of()) + .mockReturnValueOnce(of()) .mockReturnValueOnce(of()) // has the correct table elements .mockReturnValueOnce(of()) .mockReturnValueOnce(of()) + .mockReturnValueOnce(of()) .mockReturnValueOnce(of()) // correctly handles the search function .mockReturnValueOnce(of()) .mockReturnValueOnce(of()) + .mockReturnValueOnce(of()) .mockReturnValueOnce(of()) // expands targets to show their .mockReturnValueOnce(of()) .mockReturnValueOnce(of()) + .mockReturnValueOnce(of()) .mockReturnValueOnce(of(mockRecordingSavedNotification)) // increments the count when an archived recording is saved .mockReturnValueOnce(of())