Add bind atoms hook
This commit is contained in:
parent
b08125f68e
commit
ddc9bdef70
1 changed files with 16 additions and 0 deletions
16
src/app/state/hooks/useBindAtoms.ts
Normal file
16
src/app/state/hooks/useBindAtoms.ts
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
import { MatrixClient } from 'matrix-js-sdk';
|
||||||
|
import { allInvitesAtom, useBindAllInvitesAtom } from '../inviteList';
|
||||||
|
import { allRoomsAtom, useBindAllRoomsAtom } from '../roomList';
|
||||||
|
import { mDirectAtom, useBindMDirectAtom } from '../mDirectList';
|
||||||
|
import { muteChangesAtom, mutedRoomsAtom, useBindMutedRoomsAtom } from '../mutedRoomList';
|
||||||
|
import { roomToUnreadAtom, useBindRoomToUnreadAtom } from '../roomToUnread';
|
||||||
|
import { roomToParentsAtom, useBindRoomToParentsAtom } from '../roomToParents';
|
||||||
|
|
||||||
|
export const useBindAtoms = (mx: MatrixClient) => {
|
||||||
|
useBindMDirectAtom(mx, mDirectAtom);
|
||||||
|
useBindAllInvitesAtom(mx, allInvitesAtom);
|
||||||
|
useBindAllRoomsAtom(mx, allRoomsAtom);
|
||||||
|
useBindRoomToParentsAtom(mx, roomToParentsAtom);
|
||||||
|
useBindMutedRoomsAtom(mx, mutedRoomsAtom);
|
||||||
|
useBindRoomToUnreadAtom(mx, roomToUnreadAtom, muteChangesAtom);
|
||||||
|
};
|
Loading…
Reference in a new issue