Adds transitions to panels

Co-authored-by: Jamie Kyle <jamie@signal.org>
This commit is contained in:
Josh Perez 2023-07-26 18:23:32 -04:00 committed by GitHub
parent bbd43b6e38
commit 4ec94367c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 708 additions and 414 deletions

View file

@ -5,10 +5,9 @@ import { useCallback, useEffect } from 'react';
import { get } from 'lodash';
import { useSelector } from 'react-redux';
import type { PanelRenderType } from '../types/Panels';
import type { StateType } from '../state/reducer';
import * as KeyboardLayout from '../services/keyboardLayout';
import { getTopPanel } from '../state/selectors/conversations';
import { getHasPanelOpen } from '../state/selectors/conversations';
import { isInFullScreenCall } from '../state/selectors/calling';
import { isShowingAnyModal } from '../state/selectors/globalModals';
import { shouldShowStoriesView } from '../state/selectors/stories';
@ -30,10 +29,7 @@ function isCtrlOrAlt(ev: KeyboardEvent): boolean {
}
function useHasPanels(): boolean {
const topPanel = useSelector<StateType, PanelRenderType | undefined>(
getTopPanel
);
return Boolean(topPanel);
return useSelector(getHasPanelOpen);
}
function useHasGlobalModal(): boolean {