subs-fix
This commit is contained in:
parent
f6c64b1d46
commit
7e46bbdd9e
|
@ -5,6 +5,7 @@ import { Meta } from '@solidjs/meta'
|
||||||
import { clsx } from 'clsx'
|
import { clsx } from 'clsx'
|
||||||
import { Show, createMemo, createSignal, Switch, onMount, For, Match, createEffect, on } from 'solid-js'
|
import { Show, createMemo, createSignal, Switch, onMount, For, Match, createEffect, on } from 'solid-js'
|
||||||
|
|
||||||
|
import { useFollowing } from '../../../context/following'
|
||||||
import { useLocalize } from '../../../context/localize'
|
import { useLocalize } from '../../../context/localize'
|
||||||
import { apiClient } from '../../../graphql/client/core'
|
import { apiClient } from '../../../graphql/client/core'
|
||||||
import { router, useRouter } from '../../../stores/router'
|
import { router, useRouter } from '../../../stores/router'
|
||||||
|
@ -25,7 +26,6 @@ import { Row3 } from '../../Feed/Row3'
|
||||||
|
|
||||||
import styles from './Author.module.scss'
|
import styles from './Author.module.scss'
|
||||||
import stylesArticle from '../../Article/Article.module.scss'
|
import stylesArticle from '../../Article/Article.module.scss'
|
||||||
import { useFollowing } from '../../../context/following'
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
shouts: Shout[]
|
shouts: Shout[]
|
||||||
|
|
|
@ -34,13 +34,13 @@ export const InboxProvider = (props: { children: JSX.Element }) => {
|
||||||
const { sortedAuthors } = useAuthorsStore()
|
const { sortedAuthors } = useAuthorsStore()
|
||||||
|
|
||||||
const handleMessage = (sseMessage: SSEMessage) => {
|
const handleMessage = (sseMessage: SSEMessage) => {
|
||||||
console.log('[context.inbox]:', sseMessage)
|
|
||||||
|
|
||||||
// handling all action types: create update delete join left seen
|
// handling all action types: create update delete join left seen
|
||||||
if (sseMessage.entity === 'message') {
|
if (sseMessage.entity === 'message') {
|
||||||
|
console.debug('[context.inbox]:', sseMessage.payload)
|
||||||
const relivedMessage = sseMessage.payload
|
const relivedMessage = sseMessage.payload
|
||||||
setMessages((prev) => [...prev, relivedMessage])
|
setMessages((prev) => [...prev, relivedMessage])
|
||||||
} else if (sseMessage.entity === 'chat') {
|
} else if (sseMessage.entity === 'chat') {
|
||||||
|
console.debug('[context.inbox]:', sseMessage.payload)
|
||||||
const relivedChat = sseMessage.payload
|
const relivedChat = sseMessage.payload
|
||||||
setChats((prev) => [...prev, relivedChat])
|
setChats((prev) => [...prev, relivedChat])
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user