mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 12:28:50 +03:00
show as pending whilst in an empty state until told better to prevent a flash
This commit is contained in:
parent
3d47e25955
commit
d824145638
1 changed files with 2 additions and 2 deletions
|
@ -36,7 +36,7 @@ const EncryptionPanel = ({verificationRequest, member, onClose}) => {
|
||||||
setRequest(verificationRequest);
|
setRequest(verificationRequest);
|
||||||
}, [verificationRequest]);
|
}, [verificationRequest]);
|
||||||
|
|
||||||
const [phase, setPhase] = useState(false);
|
const [phase, setPhase] = useState(undefined);
|
||||||
const changeHandler = useCallback(() => {
|
const changeHandler = useCallback(() => {
|
||||||
// handle transitions -> cancelled for mismatches which fire a modal instead of showing a card
|
// handle transitions -> cancelled for mismatches which fire a modal instead of showing a card
|
||||||
if (request && request.cancelled && MISMATCHES.includes(request.cancellationCode)) {
|
if (request && request.cancelled && MISMATCHES.includes(request.cancellationCode)) {
|
||||||
|
@ -71,7 +71,7 @@ const EncryptionPanel = ({verificationRequest, member, onClose}) => {
|
||||||
setRequest(verificationRequest);
|
setRequest(verificationRequest);
|
||||||
}, [member.userId]);
|
}, [member.userId]);
|
||||||
|
|
||||||
const requested = request && phase === PHASE_REQUESTED;
|
const requested = request && (phase === PHASE_REQUESTED || phase === undefined);
|
||||||
if (!request || requested) {
|
if (!request || requested) {
|
||||||
return <EncryptionInfo onStartVerification={onStartVerification} member={member} pending={requested} />;
|
return <EncryptionInfo onStartVerification={onStartVerification} member={member} pending={requested} />;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue