Skip to content

Commit

Permalink
Cwdoe 1325 UI data service update (#144)
Browse files Browse the repository at this point in the history
* handle UI local storage structure changes
  • Loading branch information
sei-tspencer committed May 7, 2024
1 parent 90d1801 commit 5e146d0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blueprint-ui",
"version": "1.0.8-rc1",
"version": "1.0.8-rc2",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down
7 changes: 5 additions & 2 deletions src/app/data/ui/ui-data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ export class UIState {
providedIn: 'root',
})
export class UIDataService {
private uiState = JSON.parse(localStorage.getItem('uiState')) || new UIState();
private uiState = new UIState();

constructor() {}
constructor() {
const savedState = JSON.parse(localStorage.getItem('uiState'));
this.uiState = Object.assign(this.uiState, savedState);
}

//
// Item Expansion
Expand Down
1 change: 0 additions & 1 deletion src/app/services/signalr.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export class SignalRService implements OnDestroy {
}

this.applicationArea = applicationArea;
const accessToken = this.authService.getAuthorizationToken();
this.hubConnection = new signalR.HubConnectionBuilder()
.withUrl(this.getHubUrlWithAuth())
.withAutomaticReconnect(new RetryPolicy(120, 0, 5))
Expand Down

0 comments on commit 5e146d0

Please sign in to comment.