mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
Settings window: Don't show until everything is rendered
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user