diff --git a/external/lang b/external/lang
index e010e46e..1394a127 160000
--- a/external/lang
+++ b/external/lang
@@ -1 +1 @@
-Subproject commit e010e46ee9f226373a253c351b50ccdeea1c8b50
+Subproject commit 1394a127994951e19603be77ce2233c8133e3a81
diff --git a/src/context/revoltjs/RevoltClient.tsx b/src/context/revoltjs/RevoltClient.tsx
index 44681b80..ffffe198 100644
--- a/src/context/revoltjs/RevoltClient.tsx
+++ b/src/context/revoltjs/RevoltClient.tsx
@@ -9,6 +9,7 @@ import { Preloader } from "@revoltchat/ui";
import { useApplicationState } from "../../mobx/State";
+import Preloader from "../../components/ui/Preloader";
import { Children } from "../../types/Preact";
import { useIntermediate } from "../intermediate/Intermediate";
import { registerEvents } from "./events";
@@ -80,6 +81,7 @@ export default observer(({ children }: Props) => {
}, [state.auth.getSession()]);
useEffect(() => registerEvents(state, setStatus, client), [client]);
+ useEffect(() => state.registerListeners(client), [client]);
if (!loaded || status === ClientStatus.LOADING) {
return ;
diff --git a/src/context/revoltjs/SyncManager.tsx b/src/context/revoltjs/SyncManager.tsx
index 3137cad9..33cb78c6 100644
--- a/src/context/revoltjs/SyncManager.tsx
+++ b/src/context/revoltjs/SyncManager.tsx
@@ -22,9 +22,6 @@ export default function SyncManager() {
}
}, [client]);
- // Keep data synced.
- useEffect(() => state.registerListeners(client), [client]);
-
// Take data updates from Revolt.
useEffect(() => {
if (!client) return;
diff --git a/src/context/revoltjs/util.tsx b/src/context/revoltjs/util.tsx
index 106fefe9..878cc50e 100644
--- a/src/context/revoltjs/util.tsx
+++ b/src/context/revoltjs/util.tsx
@@ -7,12 +7,12 @@ import { Children } from "../../types/Preact";
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function takeError(error: any): string {
if (error.response) {
- const status = error.response.status;
- if (error.response.type) {
- return error.response.type;
+ const type = error.response.data?.type;
+ if (type) {
+ return type;
}
- switch (status) {
+ switch (error.response.status) {
case 429:
return "TooManyRequests";
case 401:
diff --git a/src/pages/settings/panes/Account.tsx b/src/pages/settings/panes/Account.tsx
index 2516d995..d5c2bb4b 100644
--- a/src/pages/settings/panes/Account.tsx
+++ b/src/pages/settings/panes/Account.tsx
@@ -174,13 +174,9 @@ export const Account = observer(() => {
@@ -208,23 +204,26 @@ export const Account = observer(() => {
}
description={
- "Disable your account. You won't be able to access it unless you log back in."
+ "Disable your account. You won't be able to access it unless you contact support."
}
- disabled
- action={}>
+ action="chevron"
+ onClick={() => {
+ //
+ }}>
-
- }
- description={
- "Delete your account, including all of your data. (sends an email to contact@revolt.chat)"
- }
- action="external">
-
-
-
-
+ }
+ description={
+ "Your account will be queued for deletion, a confirmation email will be sent."
+ }
+ hover
+ action="chevron"
+ onClick={() => {
+ //
+ }}>
+
+