Settings window: Don't show until everything is rendered
This commit is contained in:
parent
bf25a5db0b
commit
30c3b7630c
6 changed files with 34 additions and 22 deletions
|
@ -78,6 +78,7 @@ export type PropsType = {
|
|||
addCustomColor: (color: CustomColorType) => unknown;
|
||||
closeSettings: () => unknown;
|
||||
doDeleteAllData: () => unknown;
|
||||
doneRendering: () => unknown;
|
||||
editCustomColor: (colorId: string, color: CustomColorType) => unknown;
|
||||
getConversationsWithCustomColor: (
|
||||
colorId: string
|
||||
|
@ -164,6 +165,7 @@ export const Preferences = ({
|
|||
defaultConversationColor,
|
||||
deviceName = '',
|
||||
doDeleteAllData,
|
||||
doneRendering,
|
||||
editCustomColor,
|
||||
getConversationsWithCustomColor,
|
||||
hasAudioNotifications,
|
||||
|
@ -251,6 +253,10 @@ export const Preferences = ({
|
|||
document.body.classList.toggle('dark-theme', theme === ThemeType.dark);
|
||||
}, [theme]);
|
||||
|
||||
useEffect(() => {
|
||||
doneRendering();
|
||||
}, [doneRendering]);
|
||||
|
||||
useEffect(() => {
|
||||
const handler = (event: KeyboardEvent) => {
|
||||
if (event.key === 'Escape') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue