fix(user-preferences): Fix the issues with saving/retrieving user preferences in OHIFViewer

This commit is contained in:
Evren Ozkan 2018-11-09 13:22:14 -05:00
parent 5017fd13af
commit a4b8f2c5ed
4 changed files with 8 additions and 3 deletions

View File

@ -0,0 +1,3 @@
<body>
<div id="notificationArea" class="notification-area"></div>
</body>

View File

@ -0,0 +1,2 @@
body
background-color: black

View File

@ -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) {

View File

@ -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) {