Load member sidebar into MobX state.

This commit is contained in:
Paul
2021-07-29 21:01:03 +01:00
parent b06729d0b3
commit b0681dfc99
8 changed files with 57 additions and 31 deletions

View File

@@ -3,10 +3,10 @@ import { ClientboundNotification } from "revolt.js/dist/websocket/notifications"
import { StateUpdater } from "preact/hooks";
import { dispatch } from "../../redux";
import { DataStore } from "../../mobx";
import { useData } from "../../mobx/State";
import { dispatch } from "../../redux";
import { ClientOperations, ClientStatus } from "./RevoltClient";
export var preventReconnect = false;
@@ -20,7 +20,6 @@ export function registerEvents(
{ operations }: { operations: ClientOperations },
setStatus: StateUpdater<ClientStatus>,
client: Client,
store: DataStore,
) {
function attemptReconnect() {
if (preventReconnect) return;
@@ -48,7 +47,6 @@ export function registerEvents(
},
packet: (packet: ClientboundNotification) => {
store.packet(packet);
switch (packet.type) {
case "ChannelStartTyping": {
if (packet.user === client.user?._id) return;