mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-02-24 23:07:36 +08:00
Fix a issue that language profiles won't show in some situations
This commit is contained in:
parent
4a777c13c8
commit
4bf0555ece
1 changed files with 2 additions and 10 deletions
|
@ -1,12 +1,7 @@
|
|||
import { faTrash, faWrench } from "@fortawesome/free-solid-svg-icons";
|
||||
import { ActionButton, SimpleTable, useShowModal } from "components";
|
||||
import { cloneDeep } from "lodash";
|
||||
import React, {
|
||||
FunctionComponent,
|
||||
useCallback,
|
||||
useMemo,
|
||||
useState,
|
||||
} from "react";
|
||||
import React, { FunctionComponent, useCallback, useMemo } from "react";
|
||||
import { Badge, Button, ButtonGroup } from "react-bootstrap";
|
||||
import { Column, TableUpdater } from "react-table";
|
||||
import { useEnabledLanguagesContext, useProfilesContext } from ".";
|
||||
|
@ -16,12 +11,10 @@ import Modal from "./modal";
|
|||
import { anyCutoff } from "./options";
|
||||
|
||||
const Table: FunctionComponent = () => {
|
||||
const originalProfiles = useProfilesContext();
|
||||
const profiles = useProfilesContext();
|
||||
|
||||
const languages = useEnabledLanguagesContext();
|
||||
|
||||
const [profiles, setProfiles] = useState(() => cloneDeep(originalProfiles));
|
||||
|
||||
const nextProfileId = useMemo(
|
||||
() =>
|
||||
1 +
|
||||
|
@ -36,7 +29,6 @@ const Table: FunctionComponent = () => {
|
|||
const submitProfiles = useCallback(
|
||||
(list: Language.Profile[]) => {
|
||||
update(list, languageProfileKey);
|
||||
setProfiles(list);
|
||||
},
|
||||
[update]
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue