Manage ignored users (#814)
* Add options to display/ignore usersId's * Update string * Hide search icon in encrypted rooms (#763) * Fix styles
This commit is contained in:
parent
1aa16a43ee
commit
8583ab19f0
9 changed files with 95 additions and 9 deletions
|
|
@ -5,12 +5,12 @@ import initMatrix from '../../client/initMatrix';
|
|||
|
||||
export function useAccountData(eventType) {
|
||||
const mx = initMatrix.matrixClient;
|
||||
const [event, setEvent] = useState(mx.getAccountData(eventType)?.getContent());
|
||||
const [event, setEvent] = useState(mx.getAccountData(eventType));
|
||||
|
||||
useEffect(() => {
|
||||
const handleChange = (mEvent) => {
|
||||
if (mEvent.getType() !== eventType) return;
|
||||
setEvent(mEvent.getContent());
|
||||
setEvent(mEvent);
|
||||
};
|
||||
mx.on('accountData', handleChange);
|
||||
return () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue