fix(user-preferences): Fix the issues with saving/retrieving user preferences in OHIFViewer
This commit is contained in:
1 parent
5017fd13af
commit
a4b8f2c5ed
4 files changed
+8
-3
No files matched your search
@@ -36,7 +36,7 @@ export class HotkeysManager {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (this.storeFunction) {
|
||||
this.storeFunction.call(this, storageKey, definitions).then(resolve).catch(reject);
|
||||
} else if (Meteor.userId()) {
|
||||
} else if (OHIF.user.userLoggedIn()) {
|
||||
OHIF.user.setData(storageKey, definitions).then(resolve).catch(reject);
|
||||
} else {
|
||||
Session.setPersistent(storageKey, definitions);
|
||||
@@ -50,7 +50,7 @@ export class HotkeysManager {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (this.retrieveFunction) {
|
||||
this.retrieveFunction(contextName).then(resolve).catch(reject);
|
||||
} else if (OHIF.user) {
|
||||
} else if (OHIF.user.userLoggedIn()) {
|
||||
try {
|
||||
resolve(OHIF.user.getData(storageKey));
|
||||
} catch(error) {
|
||||
|
||||
@@ -153,7 +153,7 @@ class WindowLevelPresetsManager {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (this.retrieveFunction) {
|
||||
this.retrieveFunction.call(this).then(resolve).catch(reject);
|
||||
} else if (OHIF.user) {
|
||||
} else if (OHIF.user.userLoggedIn()) {
|
||||
try {
|
||||
resolve(OHIF.user.getData(WL_STORAGE_KEY));
|
||||
} catch(error) {
|
||||
|
||||
Reference in new issue
Block a user