mirror of
https://github.com/billsonnn/nitro-react.git
synced 2025-01-19 05:46:27 +01:00
Remove packet listener
This commit is contained in:
parent
3363aa0602
commit
81d47e5dab
@ -1,4 +1,4 @@
|
|||||||
import { ApproveNameMessageEvent, CatalogPageMessageEvent, CatalogPagesListEvent, CatalogPublishedMessageEvent, ClubGiftInfoEvent, GiftReceiverNotFoundEvent, GiftWrappingConfigurationEvent, HabboClubOffersMessageEvent, LimitedEditionSoldOutEvent, MarketplaceConfigurationEvent, MarketplaceMakeOfferResult, NodeData, ProductOfferEvent, PurchaseErrorMessageEvent, PurchaseNotAllowedMessageEvent, PurchaseOKMessageEvent, SellablePetPalettesMessageEvent, UserSubscriptionEvent } from '@nitrots/nitro-renderer';
|
import { ApproveNameMessageEvent, CatalogPageMessageEvent, CatalogPagesListEvent, CatalogPublishedMessageEvent, ClubGiftInfoEvent, GiftReceiverNotFoundEvent, GiftWrappingConfigurationEvent, HabboClubOffersMessageEvent, LimitedEditionSoldOutEvent, MarketplaceMakeOfferResult, NodeData, ProductOfferEvent, PurchaseErrorMessageEvent, PurchaseNotAllowedMessageEvent, PurchaseOKMessageEvent, SellablePetPalettesMessageEvent, UserSubscriptionEvent } from '@nitrots/nitro-renderer';
|
||||||
import { GuildMembershipsMessageEvent } from '@nitrots/nitro-renderer/src/nitro/communication/messages/incoming/user/GuildMembershipsMessageEvent';
|
import { GuildMembershipsMessageEvent } from '@nitrots/nitro-renderer/src/nitro/communication/messages/incoming/user/GuildMembershipsMessageEvent';
|
||||||
import { FC, useCallback } from 'react';
|
import { FC, useCallback } from 'react';
|
||||||
import { GetFurnitureData, GetProductDataForLocalization, LocalizeText, NotificationAlertType, NotificationUtilities } from '../../api';
|
import { GetFurnitureData, GetProductDataForLocalization, LocalizeText, NotificationAlertType, NotificationUtilities } from '../../api';
|
||||||
@ -289,18 +289,6 @@ export const CatalogMessageHandler: FC<{}> = props =>
|
|||||||
NotificationUtilities.simpleAlert(message, NotificationAlertType.DEFAULT, null, null, title);
|
NotificationUtilities.simpleAlert(message, NotificationAlertType.DEFAULT, null, null, title);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const onMarketplaceConfigurationEvent = useCallback((event: MarketplaceConfigurationEvent) =>
|
|
||||||
{
|
|
||||||
const parser = event.getParser();
|
|
||||||
|
|
||||||
setCatalogOptions(prevValue =>
|
|
||||||
{
|
|
||||||
const marketplaceConfiguration = parser;
|
|
||||||
|
|
||||||
return { ...prevValue, marketplaceConfiguration };
|
|
||||||
});
|
|
||||||
}, [ setCatalogOptions ]);
|
|
||||||
|
|
||||||
const onClubGiftInfoEvent = useCallback((event: ClubGiftInfoEvent) =>
|
const onClubGiftInfoEvent = useCallback((event: ClubGiftInfoEvent) =>
|
||||||
{
|
{
|
||||||
const parser = event.getParser();
|
const parser = event.getParser();
|
||||||
@ -330,7 +318,6 @@ export const CatalogMessageHandler: FC<{}> = props =>
|
|||||||
UseMessageEventHook(GiftWrappingConfigurationEvent, onGiftWrappingConfigurationEvent);
|
UseMessageEventHook(GiftWrappingConfigurationEvent, onGiftWrappingConfigurationEvent);
|
||||||
UseMessageEventHook(ClubGiftInfoEvent, onClubGiftInfoEvent);
|
UseMessageEventHook(ClubGiftInfoEvent, onClubGiftInfoEvent);
|
||||||
UseMessageEventHook(MarketplaceMakeOfferResult, onMarketplaceMakeOfferResult);
|
UseMessageEventHook(MarketplaceMakeOfferResult, onMarketplaceMakeOfferResult);
|
||||||
UseMessageEventHook(MarketplaceConfigurationEvent, onMarketplaceConfigurationEvent);
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FrontPageItem, GetCatalogIndexComposer, GetCatalogPageComposer, GetClubGiftInfo, GetGiftWrappingConfigurationComposer, GetMarketplaceConfigurationMessageComposer, ILinkEventTracker, RoomPreviewer } from '@nitrots/nitro-renderer';
|
import { FrontPageItem, GetCatalogIndexComposer, GetCatalogPageComposer, GetClubGiftInfo, GetGiftWrappingConfigurationComposer, ILinkEventTracker, RoomPreviewer } from '@nitrots/nitro-renderer';
|
||||||
import { FC, useCallback, useEffect, useState } from 'react';
|
import { FC, useCallback, useEffect, useState } from 'react';
|
||||||
import { AddEventLinkTracker, GetRoomEngine, LocalizeText, PlaySound, RemoveLinkEventTracker, SendMessageComposer, SoundNames } from '../../api';
|
import { AddEventLinkTracker, GetRoomEngine, LocalizeText, PlaySound, RemoveLinkEventTracker, SendMessageComposer, SoundNames } from '../../api';
|
||||||
import { Column, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../common';
|
import { Column, Grid, NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../common';
|
||||||
@ -346,7 +346,6 @@ export const CatalogView: FC<{}> = props =>
|
|||||||
{
|
{
|
||||||
if(!isVisible || rootNode) return;
|
if(!isVisible || rootNode) return;
|
||||||
|
|
||||||
SendMessageComposer(new GetMarketplaceConfigurationMessageComposer());
|
|
||||||
SendMessageComposer(new GetGiftWrappingConfigurationComposer());
|
SendMessageComposer(new GetGiftWrappingConfigurationComposer());
|
||||||
SendMessageComposer(new GetClubGiftInfo());
|
SendMessageComposer(new GetClubGiftInfo());
|
||||||
SendMessageComposer(new GetCatalogIndexComposer(currentType));
|
SendMessageComposer(new GetCatalogIndexComposer(currentType));
|
||||||
|
Loading…
Reference in New Issue
Block a user