Added session based view updation for gallery notebooks (#120)

This commit is contained in:
Srinath Narayanan
2020-07-31 12:31:05 -07:00
committed by GitHub
parent dab6e43d0d
commit 14ef40029d
2 changed files with 12 additions and 3 deletions

View File

@@ -44,7 +44,11 @@ export class SessionStorageUtility {
}
public static getEntryNumber(key: StorageKey): number {
return StringUtility.toNumber(localStorage.getItem(StorageKey[key]));
return StringUtility.toNumber(sessionStorage.getItem(StorageKey[key]));
}
public static getEntry(key: string): string | null {
return sessionStorage.getItem(key);
}
public static removeEntry(key: StorageKey): void {
@@ -55,6 +59,10 @@ export class SessionStorageUtility {
sessionStorage.setItem(StorageKey[key], value);
}
public static setEntry(key: string, value: string): void {
sessionStorage.setItem(key, value);
}
public static setEntryNumber(key: StorageKey, value: number): void {
sessionStorage.setItem(StorageKey[key], value.toString());
}