mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-23 14:40:50 +01:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
a094206d66
@ -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