Place calls on top of story viewer, pause stories while in call
This commit is contained in:
parent
190db3580d
commit
726e67ce95
5 changed files with 18 additions and 4 deletions
|
@ -7482,7 +7482,7 @@ button.module-image__border-overlay:focus {
|
||||||
left: var(--window-border);
|
left: var(--window-border);
|
||||||
top: var(--titlebar-height);
|
top: var(--titlebar-height);
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: $z-index-popup-overlay;
|
z-index: $z-index-modal-host;
|
||||||
}
|
}
|
||||||
|
|
||||||
.module-modal-host__overlay-container {
|
.module-modal-host__overlay-container {
|
||||||
|
@ -7496,7 +7496,7 @@ button.module-image__border-overlay:focus {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: $z-index-popup-overlay;
|
z-index: $z-index-modal-host;
|
||||||
}
|
}
|
||||||
|
|
||||||
.module-modal-host--on-top-of-everything {
|
.module-modal-host--on-top-of-everything {
|
||||||
|
|
|
@ -265,8 +265,9 @@ $z-index-window-controls: 10000;
|
||||||
// popups, tooltips, toasts, and other items should stack above it.
|
// popups, tooltips, toasts, and other items should stack above it.
|
||||||
$z-index-story-meta: 3;
|
$z-index-story-meta: 3;
|
||||||
$z-index-scroll-down-button: 10;
|
$z-index-scroll-down-button: 10;
|
||||||
$z-index-stories: 97;
|
$z-index-stories: 98;
|
||||||
$z-index-calling: 98;
|
$z-index-calling: 100;
|
||||||
|
$z-index-modal-host: 101;
|
||||||
$z-index-above-popup: 101;
|
$z-index-above-popup: 101;
|
||||||
$z-index-calling-pip: 103;
|
$z-index-calling-pip: 103;
|
||||||
$z-index-above-context-menu: 126;
|
$z-index-above-context-menu: 126;
|
||||||
|
|
|
@ -56,6 +56,7 @@ export type PropsType = {
|
||||||
| 'sharedGroupNames'
|
| 'sharedGroupNames'
|
||||||
| 'title'
|
| 'title'
|
||||||
>;
|
>;
|
||||||
|
hasActiveCall?: boolean;
|
||||||
hasAllStoriesMuted: boolean;
|
hasAllStoriesMuted: boolean;
|
||||||
i18n: LocalizerType;
|
i18n: LocalizerType;
|
||||||
loadStoryReplies: (conversationId: string, messageId: string) => unknown;
|
loadStoryReplies: (conversationId: string, messageId: string) => unknown;
|
||||||
|
@ -103,6 +104,7 @@ export const StoryViewer = ({
|
||||||
deleteStoryForEveryone,
|
deleteStoryForEveryone,
|
||||||
getPreferredBadge,
|
getPreferredBadge,
|
||||||
group,
|
group,
|
||||||
|
hasActiveCall,
|
||||||
hasAllStoriesMuted,
|
hasAllStoriesMuted,
|
||||||
i18n,
|
i18n,
|
||||||
loadStoryReplies,
|
loadStoryReplies,
|
||||||
|
@ -276,6 +278,7 @@ export const StoryViewer = ({
|
||||||
const [pauseStory, setPauseStory] = useState(false);
|
const [pauseStory, setPauseStory] = useState(false);
|
||||||
|
|
||||||
const shouldPauseViewing =
|
const shouldPauseViewing =
|
||||||
|
hasActiveCall ||
|
||||||
hasConfirmHideStory ||
|
hasConfirmHideStory ||
|
||||||
hasExpandedCaption ||
|
hasExpandedCaption ||
|
||||||
hasStoryDetailsModal ||
|
hasStoryDetailsModal ||
|
||||||
|
|
|
@ -59,6 +59,12 @@ export const isInCall = createSelector(
|
||||||
(call: CallStateType | undefined): boolean => Boolean(call)
|
(call: CallStateType | undefined): boolean => Boolean(call)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const isInFullScreenCall = createSelector(
|
||||||
|
getCalling,
|
||||||
|
(state: CallingStateType): boolean =>
|
||||||
|
Boolean(state.activeCallState && !state.activeCallState.pip)
|
||||||
|
);
|
||||||
|
|
||||||
export const getIncomingCall = createSelector(
|
export const getIncomingCall = createSelector(
|
||||||
getCallsByConversation,
|
getCallsByConversation,
|
||||||
getUserACI,
|
getUserACI,
|
||||||
|
|
|
@ -24,6 +24,7 @@ import {
|
||||||
getStoryReplies,
|
getStoryReplies,
|
||||||
getStoryByIdSelector,
|
getStoryByIdSelector,
|
||||||
} from '../selectors/stories';
|
} from '../selectors/stories';
|
||||||
|
import { isInFullScreenCall } from '../selectors/calling';
|
||||||
import { renderEmojiPicker } from './renderEmojiPicker';
|
import { renderEmojiPicker } from './renderEmojiPicker';
|
||||||
import { strictAssert } from '../../util/assert';
|
import { strictAssert } from '../../util/assert';
|
||||||
import { useActions as useEmojisActions } from '../ducks/emojis';
|
import { useActions as useEmojisActions } from '../ducks/emojis';
|
||||||
|
@ -79,11 +80,14 @@ export function SmartStoryViewer(): JSX.Element | null {
|
||||||
getHasAllStoriesMuted
|
getHasAllStoriesMuted
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const hasActiveCall = useSelector(isInFullScreenCall);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StoryViewer
|
<StoryViewer
|
||||||
currentIndex={selectedStoryData.currentIndex}
|
currentIndex={selectedStoryData.currentIndex}
|
||||||
getPreferredBadge={getPreferredBadge}
|
getPreferredBadge={getPreferredBadge}
|
||||||
group={conversationStory.group}
|
group={conversationStory.group}
|
||||||
|
hasActiveCall={hasActiveCall}
|
||||||
hasAllStoriesMuted={hasAllStoriesMuted}
|
hasAllStoriesMuted={hasAllStoriesMuted}
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
numStories={selectedStoryData.numStories}
|
numStories={selectedStoryData.numStories}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue