|
|
|
@ -13,6 +13,7 @@ import {
@@ -13,6 +13,7 @@ import {
|
|
|
|
|
} from "@/shared"; |
|
|
|
|
import _ from "lodash"; |
|
|
|
|
import { SocketEvents } from "@/shared/events"; |
|
|
|
|
import { setItemTask } from "@/containers/Task/actions"; |
|
|
|
|
|
|
|
|
|
interface IProps { |
|
|
|
|
containerHeight: number; |
|
|
|
@ -68,11 +69,11 @@ const Topbar = (props: IProps) => {
@@ -68,11 +69,11 @@ const Topbar = (props: IProps) => {
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const onNewNotification = ({ |
|
|
|
|
notification, |
|
|
|
|
}: SocketEvents["notification"]) => { |
|
|
|
|
const newList = [notification, ...paginationList.items]; |
|
|
|
|
paginationList._setItems(newList); |
|
|
|
|
const onNewNotification = ({}: SocketEvents["notification"]) => { |
|
|
|
|
paginationList.resetFlatList(); |
|
|
|
|
setTimeout(() => { |
|
|
|
|
paginationList.resetFlatList(); |
|
|
|
|
}, 100); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
useSocketListener("notification", onNewNotification, [paginationList.items]); |
|
|
|
|