mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-14 00:26:21 +00:00
Fix: deselect and trigger refresh for deleted documents from bulk operations with "delete originals" (#8996)
This commit is contained in:
@@ -6,7 +6,6 @@ import { ToastsComponent } from './components/common/toasts/toasts.component'
|
||||
import { FileDropComponent } from './components/file-drop/file-drop.component'
|
||||
import { SETTINGS_KEYS } from './data/ui-settings'
|
||||
import { ComponentRouterService } from './services/component-router.service'
|
||||
import { ConsumerStatusService } from './services/consumer-status.service'
|
||||
import { HotKeyService } from './services/hot-key.service'
|
||||
import {
|
||||
PermissionAction,
|
||||
@@ -16,6 +15,7 @@ import {
|
||||
import { SettingsService } from './services/settings.service'
|
||||
import { TasksService } from './services/tasks.service'
|
||||
import { ToastService } from './services/toast.service'
|
||||
import { WebsocketStatusService } from './services/websocket-status.service'
|
||||
|
||||
@Component({
|
||||
selector: 'pngx-root',
|
||||
@@ -35,7 +35,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
|
||||
constructor(
|
||||
private settings: SettingsService,
|
||||
private consumerStatusService: ConsumerStatusService,
|
||||
private websocketStatusService: WebsocketStatusService,
|
||||
private toastService: ToastService,
|
||||
private router: Router,
|
||||
private tasksService: TasksService,
|
||||
@@ -51,7 +51,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.consumerStatusService.disconnect()
|
||||
this.websocketStatusService.disconnect()
|
||||
if (this.successSubscription) {
|
||||
this.successSubscription.unsubscribe()
|
||||
}
|
||||
@@ -76,9 +76,9 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.consumerStatusService.connect()
|
||||
this.websocketStatusService.connect()
|
||||
|
||||
this.successSubscription = this.consumerStatusService
|
||||
this.successSubscription = this.websocketStatusService
|
||||
.onDocumentConsumptionFinished()
|
||||
.subscribe((status) => {
|
||||
this.tasksService.reload()
|
||||
@@ -108,7 +108,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
})
|
||||
|
||||
this.failedSubscription = this.consumerStatusService
|
||||
this.failedSubscription = this.websocketStatusService
|
||||
.onDocumentConsumptionFailed()
|
||||
.subscribe((status) => {
|
||||
this.tasksService.reload()
|
||||
@@ -121,7 +121,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
})
|
||||
|
||||
this.newDocumentSubscription = this.consumerStatusService
|
||||
this.newDocumentSubscription = this.websocketStatusService
|
||||
.onDocumentDetected()
|
||||
.subscribe((status) => {
|
||||
this.tasksService.reload()
|
||||
|
Reference in New Issue
Block a user