ReviewDB: proper multi account support

This commit is contained in:
Vendicated 2023-10-06 19:40:53 +02:00
parent 664dd0a992
commit c0f2c97458
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18
9 changed files with 143 additions and 90 deletions

View file

@ -18,12 +18,13 @@
import { LazyComponent, useAwaiter, useForceUpdater } from "@utils/react";
import { find, findByPropsLazy } from "@webpack";
import { Forms, React, RelationshipStore, useRef, UserStore } from "@webpack/common";
import { Forms, React, RelationshipStore, showToast, useRef, UserStore } from "@webpack/common";
import { Auth, authorize } from "../auth";
import { Review } from "../entities";
import { addReview, getReviews, Response, REVIEWS_PER_PAGE } from "../reviewDbApi";
import { settings } from "../settings";
import { authorize, cl, showToast } from "../utils";
import { cl } from "../utils";
import ReviewComponent from "./ReviewComponent";
@ -120,7 +121,7 @@ function ReviewList({ refetch, reviews, hideOwnReview, profileId }: { refetch():
export function ReviewsInputComponent({ discordId, isAuthor, refetch, name }: { discordId: string, name: string; isAuthor: boolean; refetch(): void; }) {
const { token } = settings.store;
const { token } = Auth;
const editorRef = useRef<any>(null);
const inputType = InputTypes.FORM;
inputType.disableAutoFocus = true;