]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
rxjs compatibility
authorMichael Shamoon <4887959+shamoon@users.noreply.github.com>
Sat, 26 Mar 2022 21:18:16 +0000 (14:18 -0700)
committerMichael Shamoon <4887959+shamoon@users.noreply.github.com>
Sat, 26 Mar 2022 21:18:16 +0000 (14:18 -0700)
src-ui/src/app/services/document-list-view.service.ts

index a77ce250923bf42fda03dc407234374d13b1d11d..e33dea1d6325ab11a82829d7ba9f455b560b67c9 100644 (file)
@@ -143,8 +143,8 @@ export class DocumentListViewService {
         activeListViewState.sortReverse,
         activeListViewState.filterRules
       )
-      .subscribe(
-        (result) => {
+      .subscribe({
+        next: (result) => {
           this.isReloading = false
           activeListViewState.collectionSize = result.count
           activeListViewState.documents = result.results
@@ -153,7 +153,7 @@ export class DocumentListViewService {
           }
           this.rangeSelectionAnchorIndex = this.lastRangeSelectionToIndex = null
         },
-        (error) => {
+        error: (error) => {
           this.isReloading = false
           if (activeListViewState.currentPage != 1 && error.status == 404) {
             // this happens when applying a filter: the current page might not be available anymore due to the reduced result set.
@@ -162,8 +162,8 @@ export class DocumentListViewService {
           } else {
             this.error = error.error
           }
-        }
-      )
+        },
+      })
   }
 
   set filterRules(filterRules: FilterRule[]) {