mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Fix missing loadViewConfig breaks loading saved view
This commit is contained in:
		| @@ -139,13 +139,7 @@ export class DocumentListComponent implements OnInit, OnDestroy { | |||||||
|       .subscribe((queryParams) => { |       .subscribe((queryParams) => { | ||||||
|         if (queryParams.has('view')) { |         if (queryParams.has('view')) { | ||||||
|           // loading a saved view on /documents |           // loading a saved view on /documents | ||||||
|           this.savedViewService |           this.loadViewConfig(parseInt(queryParams.get('view'))) | ||||||
|             .getCached(parseInt(queryParams.get('view'))) |  | ||||||
|             .pipe(first()) |  | ||||||
|             .subscribe((view) => { |  | ||||||
|               this.list.activateSavedView(view) |  | ||||||
|               this.list.reload() |  | ||||||
|             }) |  | ||||||
|         } else { |         } else { | ||||||
|           this.list.activateSavedView(null) |           this.list.activateSavedView(null) | ||||||
|           this.list.loadFromQueryParams(queryParams) |           this.list.loadFromQueryParams(queryParams) | ||||||
| @@ -180,6 +174,16 @@ export class DocumentListComponent implements OnInit, OnDestroy { | |||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   loadViewConfig(viewID: number) { | ||||||
|  |     this.savedViewService | ||||||
|  |       .getCached(viewID) | ||||||
|  |       .pipe(first()) | ||||||
|  |       .subscribe((view) => { | ||||||
|  |         this.list.activateSavedView(view) | ||||||
|  |         this.list.reload() | ||||||
|  |       }) | ||||||
|  |   } | ||||||
|  |  | ||||||
|   saveViewConfigAs() { |   saveViewConfigAs() { | ||||||
|     let modal = this.modalService.open(SaveViewConfigDialogComponent, { |     let modal = this.modalService.open(SaveViewConfigDialogComponent, { | ||||||
|       backdrop: 'static', |       backdrop: 'static', | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Michael Shamoon
					Michael Shamoon