mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-23 06:40:50 +01:00
updated more packets
This commit is contained in:
parent
e0fa891266
commit
e268a5a459
@ -1,4 +1,4 @@
|
||||
import { ChatRecordData, ModtoolRoomChatlogLine, UserProfileComposer } from '@nitrots/nitro-renderer';
|
||||
import { ChatlineData, ChatRecordData, UserProfileComposer } from '@nitrots/nitro-renderer';
|
||||
import { FC, useCallback } from 'react';
|
||||
import { AutoSizer, CellMeasurer, CellMeasurerCache, List, ListRowProps, ListRowRenderer } from 'react-virtualized';
|
||||
import { TryVisitRoom } from '../../../../api';
|
||||
@ -33,7 +33,7 @@ export const ChatlogView: FC<ChatlogViewProps> = props =>
|
||||
|
||||
const advancedRowRenderer: ListRowRenderer = (props: ListRowProps) =>
|
||||
{
|
||||
let chatlogEntry: ModtoolRoomChatlogLine;
|
||||
let chatlogEntry: ChatlineData;
|
||||
let currentRecord: ChatRecordData;
|
||||
let isRoomInfo = false;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ChatRecordData, GetRoomChatlogMessageComposer, ModtoolRoomChatlogEvent } from '@nitrots/nitro-renderer';
|
||||
import { ChatRecordData, GetRoomChatlogMessageComposer, RoomChatlogEvent } from '@nitrots/nitro-renderer';
|
||||
import { FC, useCallback, useEffect, useState } from 'react';
|
||||
import { CreateMessageHook, SendMessageHook } from '../../../../../hooks/messages';
|
||||
import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../../layout';
|
||||
@ -16,7 +16,7 @@ export const ModToolsChatlogView: FC<ModToolsChatlogViewProps> = props =>
|
||||
SendMessageHook(new GetRoomChatlogMessageComposer(roomId));
|
||||
}, [roomId]);
|
||||
|
||||
const onModtoolRoomChatlogEvent = useCallback((event: ModtoolRoomChatlogEvent) =>
|
||||
const onModtoolRoomChatlogEvent = useCallback((event: RoomChatlogEvent) =>
|
||||
{
|
||||
const parser = event.getParser();
|
||||
|
||||
@ -25,7 +25,7 @@ export const ModToolsChatlogView: FC<ModToolsChatlogViewProps> = props =>
|
||||
setRoomChatlog(parser.data);
|
||||
}, [roomId, setRoomChatlog]);
|
||||
|
||||
CreateMessageHook(ModtoolRoomChatlogEvent, onModtoolRoomChatlogEvent);
|
||||
CreateMessageHook(RoomChatlogEvent, onModtoolRoomChatlogEvent);
|
||||
|
||||
return (
|
||||
<NitroCardView className="nitro-mod-tools-room-chatlog" simple={true}>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { FriendlyTime, GetModeratorUserInfoMessageComposer, ModeratorUserInfoData, ModtoolUserInfoEvent } from '@nitrots/nitro-renderer';
|
||||
import { FriendlyTime, GetModeratorUserInfoMessageComposer, ModeratorUserInfoData, ModeratorUserInfoEvent } from '@nitrots/nitro-renderer';
|
||||
import { FC, useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { LocalizeText } from '../../../../../api';
|
||||
import { ModToolsOpenUserChatlogEvent } from '../../../../../events/mod-tools/ModToolsOpenUserChatlogEvent';
|
||||
@ -22,7 +22,7 @@ export const ModToolsUserView: FC<ModToolsUserViewProps> = props =>
|
||||
SendMessageHook(new GetModeratorUserInfoMessageComposer(userId));
|
||||
}, [ userId ]);
|
||||
|
||||
const onModtoolUserInfoEvent = useCallback((event: ModtoolUserInfoEvent) =>
|
||||
const onModtoolUserInfoEvent = useCallback((event: ModeratorUserInfoEvent) =>
|
||||
{
|
||||
const parser = event.getParser();
|
||||
|
||||
@ -31,7 +31,7 @@ export const ModToolsUserView: FC<ModToolsUserViewProps> = props =>
|
||||
setUserInfo(parser.data);
|
||||
}, [setUserInfo, userId]);
|
||||
|
||||
CreateMessageHook(ModtoolUserInfoEvent, onModtoolUserInfoEvent);
|
||||
CreateMessageHook(ModeratorUserInfoEvent, onModtoolUserInfoEvent);
|
||||
|
||||
const userProperties = useMemo(() =>
|
||||
{
|
||||
|
@ -60,7 +60,7 @@ export const NotificationCenterMessageHandler: FC<INotificationCenterMessageHand
|
||||
{
|
||||
const parser = event.getParser();
|
||||
|
||||
NotificationUtilities.handleModeratorMessage(parser.message, parser.link);
|
||||
NotificationUtilities.handleModeratorMessage(parser.message, parser.url);
|
||||
}, []);
|
||||
|
||||
CreateMessageHook(ModeratorMessageEvent, onModeratorMessageEvent);
|
||||
|
Loading…
Reference in New Issue
Block a user