Implement notifications
This commit is contained in:
parent
b05a334dcb
commit
c7d7e152a0
16 changed files with 456 additions and 81 deletions
|
@ -9,6 +9,7 @@ import {ShellModel} from './models/shell'
|
|||
|
||||
const ROOT_STATE_STORAGE_KEY = 'root'
|
||||
const DEFAULT_SERVICE = 'http://localhost:2583'
|
||||
const STATE_FETCH_INTERVAL = 15e3
|
||||
|
||||
export async function setupState() {
|
||||
let rootStore: RootStoreModel
|
||||
|
@ -32,8 +33,14 @@ export async function setupState() {
|
|||
})
|
||||
|
||||
await rootStore.session.setup()
|
||||
await rootStore.fetchStateUpdate()
|
||||
console.log(rootStore.me)
|
||||
|
||||
// periodic state fetch
|
||||
setInterval(() => {
|
||||
rootStore.fetchStateUpdate()
|
||||
}, STATE_FETCH_INTERVAL)
|
||||
|
||||
return rootStore
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue