Subscribe to theme change in settings
This commit is contained in:
parent
64fc234490
commit
bdf1287403
8 changed files with 50 additions and 13 deletions
|
@ -69,7 +69,6 @@ export type PropsType = {
|
|||
selectedCamera?: string;
|
||||
selectedMicrophone?: AudioDevice;
|
||||
selectedSpeaker?: AudioDevice;
|
||||
theme: ThemeType;
|
||||
themeSetting: ThemeSettingType;
|
||||
universalExpireTimer: number;
|
||||
whoCanFindMe: PhoneNumberDiscoverability;
|
||||
|
@ -257,7 +256,6 @@ export const Preferences = ({
|
|||
selectedMicrophone,
|
||||
selectedSpeaker,
|
||||
setGlobalDefaultConversationColor,
|
||||
theme,
|
||||
themeSetting,
|
||||
universalExpireTimer = 0,
|
||||
whoCanFindMe,
|
||||
|
@ -273,11 +271,6 @@ export const Preferences = ({
|
|||
setShowDisappearingTimerDialog,
|
||||
] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
document.body.classList.toggle('light-theme', theme === ThemeType.light);
|
||||
document.body.classList.toggle('dark-theme', theme === ThemeType.dark);
|
||||
}, [theme]);
|
||||
|
||||
useEffect(() => {
|
||||
doneRendering();
|
||||
}, [doneRendering]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue