chore(cleanup): Remove persistent-session package
This commit is contained in:
1 parent
c3565cd687
commit
5dec28ba8c
13 files changed
+11
-43
No files matched your search
@@ -143,7 +143,8 @@ class WindowLevelPresetsManager {
|
||||
} else if (OHIF.user.userLoggedIn()) {
|
||||
OHIF.user.setData(WL_STORAGE_KEY, wlPresets).then(resolve).catch(reject);
|
||||
} else {
|
||||
Session.setPersistent(WL_STORAGE_KEY, wlPresets);
|
||||
const wlPresetsJSON = JSON.stringify(wlPresets);
|
||||
localStorage.setItem(WL_STORAGE_KEY, wlPresetsJSON);
|
||||
resolve();
|
||||
}
|
||||
}).then(() => this.setOHIFWLPresets.call(this, wlPresets));
|
||||
@@ -160,7 +161,9 @@ class WindowLevelPresetsManager {
|
||||
reject(error);
|
||||
}
|
||||
} else {
|
||||
resolve(Session.get(WL_STORAGE_KEY));
|
||||
const wlPresetsJSON = localStorage.getItem(WL_STORAGE_KEY) || '';
|
||||
const wlPresets = JSON.parse(wlPresetsJSON) || undefined;
|
||||
resolve(wlPresets);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user