|
@@ -38,19 +38,22 @@ export default store => {
|
|
|
|
|
|
// Connected
|
|
// Connected
|
|
flowService.connected(() => {
|
|
flowService.connected(() => {
|
|
- const match = /.*\/s:(.*)/.exec(store.state.route.path)
|
|
|
|
- let sessId
|
|
|
|
- if (match != null) {
|
|
|
|
- sessId = match[1]
|
|
|
|
- }
|
|
|
|
- // Make this in a service
|
|
|
|
- if (sessId === undefined) {
|
|
|
|
- flowService.sessionNew()
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- store.commit(flow.SESSID_UPDATE, sessId)
|
|
|
|
store.dispatch(flow.NOTIFICATION_ADD, 'Connected')
|
|
store.dispatch(flow.NOTIFICATION_ADD, 'Connected')
|
|
- flowService.sessionLoad(undefined, sessId)
|
|
|
|
|
|
+ // Allow any persisted thing to be send first if any
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ const match = /.*\/s:(.*)/.exec(store.state.route.path)
|
|
|
|
+ let sessId
|
|
|
|
+ if (match != null) {
|
|
|
|
+ sessId = match[1]
|
|
|
|
+ }
|
|
|
|
+ // Make this in a service
|
|
|
|
+ if (sessId === undefined) {
|
|
|
|
+ flowService.sessionNew()
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ store.commit(flow.SESSID_UPDATE, sessId)
|
|
|
|
+ flowService.sessionLoad(undefined, sessId)
|
|
|
|
+ })
|
|
})
|
|
})
|
|
|
|
|
|
flowService.on('document', (v) => {
|
|
flowService.on('document', (v) => {
|