You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-19 23:16:20 +00:00
fix(session): invalidate RoomSession snapshot on room-data and permission changes
getActiveRoomSessionSnapshot() caches the frozen snapshot keyed on the session reference, but RoomDataHandler (tradeMode/groupId/isGuildRoom/doorMode/allowPets) and RoomPermissionsHandler (controllerLevel/owner) mutate those fields on the same session object without invalidating the cache. Any consumer reading a mutable field via useActiveRoomSessionSnapshot would get stale data and never re-render. Expose invalidateRoomSessionSnapshot() on IRoomHandlerListener and call it from both handlers after they mutate the session.
This commit is contained in:
@@ -5,4 +5,5 @@ export interface IRoomHandlerListener
|
||||
getSession(id: number): IRoomSession;
|
||||
sessionUpdate(id: number, type: string): void;
|
||||
sessionReinitialize(fromRoomId: number, toRoomId: number): void;
|
||||
invalidateRoomSessionSnapshot(): void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user