don't reset socket for statuses store
This commit is contained in:
parent
16e89d0a90
commit
0a46ce3d6d
1 changed files with 1 additions and 7 deletions
|
|
@ -64,15 +64,9 @@ export const useStatusesStore = defineStore('statuses', {
|
|||
this.socket = socket
|
||||
},
|
||||
resetStatuses() {
|
||||
this.socket.et.removeEventListener('update', this.socket.handleUpdate)
|
||||
this.socket.et.removeEventListener(
|
||||
'status.update',
|
||||
this.socket.handleUpdate,
|
||||
)
|
||||
this.socket.et.removeEventListener('delete', this.socket.handleDelete)
|
||||
|
||||
const emptyState = defaultState()
|
||||
Object.entries(emptyState).forEach(([key, value]) => {
|
||||
if (key === 'socket') return
|
||||
this[key] = value
|
||||
})
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue