mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
save
This commit is contained in:
@@ -11,13 +11,13 @@ export class PublicationListService {
|
||||
// main data
|
||||
private _document: Publication[] = []
|
||||
// local storage keyName
|
||||
private keyName: string;
|
||||
private keyName: string;
|
||||
|
||||
constructor() {
|
||||
|
||||
this.keyName = (SHA1(this.constructor.name+ 'view-publication-list/local')).toString()
|
||||
|
||||
setTimeout(()=>{
|
||||
setTimeout(()=>{
|
||||
let restore = localstoreService.get(this.keyName, [])
|
||||
this._document = restore.document
|
||||
}, 10)
|
||||
@@ -35,7 +35,7 @@ export class PublicationListService {
|
||||
add(folderId, document) {
|
||||
this._document[folderId] = document
|
||||
|
||||
setTimeout(()=> {
|
||||
setTimeout(()=> {
|
||||
localstoreService.set(this.keyName, {
|
||||
document: this._document
|
||||
})
|
||||
@@ -45,4 +45,4 @@ export class PublicationListService {
|
||||
}
|
||||
|
||||
|
||||
export const PublicationListStorage = new PublicationListService()
|
||||
export const PublicationListStorage = new PublicationListService()
|
||||
|
||||
Reference in New Issue
Block a user