Move shout module to store
This commit is contained in:
parent
aa98e83ff0
commit
aa6c13f9e6
8 changed files with 50 additions and 61 deletions
|
|
@ -2,6 +2,7 @@ import backendInteractorService from '../services/backend_interactor_service/bac
|
|||
import { WSConnectionStatus } from '../services/api/api.service.js'
|
||||
import { maybeShowChatNotification } from '../services/chat_utils/chat_utils.js'
|
||||
import { Socket } from 'phoenix'
|
||||
import { useShoutStore } from '../stores/shout.js'
|
||||
|
||||
const retryTimeout = (multiplier) => 1000 * multiplier
|
||||
|
||||
|
|
@ -283,7 +284,7 @@ const api = {
|
|||
socket.connect()
|
||||
|
||||
commit('setSocket', socket)
|
||||
dispatch('initializeShout', socket)
|
||||
useShoutStore().initializeShout(socket)
|
||||
}
|
||||
},
|
||||
disconnectFromSocket ({ commit, state }) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue