mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-27 08:00:51 +01:00
fix sound settings
This commit is contained in:
parent
ff46a89e79
commit
f85efea758
@ -4,7 +4,7 @@ import { FC, useCallback, useEffect, useState } from 'react';
|
|||||||
import { LocalizeText, SendMessageComposer } from '../../api';
|
import { LocalizeText, SendMessageComposer } from '../../api';
|
||||||
import { Column, Flex, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../common';
|
import { Column, Flex, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../common';
|
||||||
import { UserSettingsUIEvent } from '../../events';
|
import { UserSettingsUIEvent } from '../../events';
|
||||||
import { DispatchUiEvent, UseMessageEventHook, UseUiEvent } from '../../hooks';
|
import { DispatchMainEvent, DispatchUiEvent, UseMessageEventHook, UseUiEvent } from '../../hooks';
|
||||||
|
|
||||||
export const UserSettingsView: FC<{}> = props =>
|
export const UserSettingsView: FC<{}> = props =>
|
||||||
{
|
{
|
||||||
@ -46,6 +46,7 @@ export const UserSettingsView: FC<{}> = props =>
|
|||||||
settingsEvent.chatType = parser.chatType;
|
settingsEvent.chatType = parser.chatType;
|
||||||
|
|
||||||
setUserSettings(settingsEvent);
|
setUserSettings(settingsEvent);
|
||||||
|
DispatchMainEvent(settingsEvent);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
UseMessageEventHook(UserSettingsEvent, onUserSettingsEvent);
|
UseMessageEventHook(UserSettingsEvent, onUserSettingsEvent);
|
||||||
@ -92,6 +93,7 @@ export const UserSettingsView: FC<{}> = props =>
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(doUpdate) setUserSettings(clone);
|
if(doUpdate) setUserSettings(clone);
|
||||||
|
DispatchMainEvent(clone)
|
||||||
}, [userSettings]);
|
}, [userSettings]);
|
||||||
|
|
||||||
const saveRangeSlider = useCallback((type: string) =>
|
const saveRangeSlider = useCallback((type: string) =>
|
||||||
|
Loading…
Reference in New Issue
Block a user