fix(member sidebar): more aggressively check if we need to update

This commit is contained in:
Paul Makles 2022-01-29 09:42:04 +00:00
parent 6020d94c3a
commit 1089651cb0

View file

@ -215,12 +215,12 @@ export const ServerMemberSidebar = observer(
useEffect(() => {
const server_id = channel.server_id!;
if (status === ClientStatus.ONLINE && !FETCHED.has(server_id)) {
FETCHED.add(server_id);
channel
.server!.syncMembers(shouldSkipOffline(server_id))
.then(() => FETCHED.add(server_id));
.then(() => FETCHED.delete(server_id));
}
// eslint-disable-next-line
}, [status, channel.server_id]);
}, [status, channel]);
const entries = useEntries(
channel,