Ensure that the GroupV1 Migration dialog shows
This commit is contained in:
parent
a2eac80034
commit
99d507a74d
3 changed files with 4 additions and 25 deletions
|
@ -2519,11 +2519,6 @@ export async function startApp(): Promise<void> {
|
||||||
});
|
});
|
||||||
|
|
||||||
routineProfileRefresher.start();
|
routineProfileRefresher.start();
|
||||||
} else {
|
|
||||||
assert(
|
|
||||||
false,
|
|
||||||
'Failed to fetch our conversation ID. Skipping routine profile refresh'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure we have the PNI identity
|
// Make sure we have the PNI identity
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { isBoolean } from 'lodash';
|
|
||||||
import { boolean } from '@storybook/addon-knobs';
|
|
||||||
import { action } from '@storybook/addon-actions';
|
import { action } from '@storybook/addon-actions';
|
||||||
|
|
||||||
import type { PropsType } from './GroupV1MigrationDialog';
|
import type { PropsType } from './GroupV1MigrationDialog';
|
||||||
|
@ -34,21 +33,11 @@ const contact3: ConversationType = getDefaultConversation({
|
||||||
id: 'guid-3',
|
id: 'guid-3',
|
||||||
});
|
});
|
||||||
|
|
||||||
function booleanOr(value: boolean | undefined, defaultValue: boolean): boolean {
|
|
||||||
return isBoolean(value) ? value : defaultValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
|
const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
|
||||||
areWeInvited: boolean(
|
areWeInvited: Boolean(overrideProps.areWeInvited),
|
||||||
'areWeInvited',
|
|
||||||
booleanOr(overrideProps.areWeInvited, false)
|
|
||||||
),
|
|
||||||
droppedMembers: overrideProps.droppedMembers || [contact3, contact1],
|
droppedMembers: overrideProps.droppedMembers || [contact3, contact1],
|
||||||
getPreferredBadge: () => undefined,
|
getPreferredBadge: () => undefined,
|
||||||
hasMigrated: boolean(
|
hasMigrated: Boolean(overrideProps.hasMigrated),
|
||||||
'hasMigrated',
|
|
||||||
booleanOr(overrideProps.hasMigrated, false)
|
|
||||||
),
|
|
||||||
i18n,
|
i18n,
|
||||||
invitedMembers: overrideProps.invitedMembers || [contact2],
|
invitedMembers: overrideProps.invitedMembers || [contact2],
|
||||||
migrate: action('migrate'),
|
migrate: action('migrate'),
|
||||||
|
|
|
@ -6,7 +6,6 @@ import { Provider } from 'react-redux';
|
||||||
|
|
||||||
import type { Store } from 'redux';
|
import type { Store } from 'redux';
|
||||||
|
|
||||||
import { ModalHost } from '../../components/ModalHost';
|
|
||||||
import type { PropsType } from '../smart/GroupV1MigrationDialog';
|
import type { PropsType } from '../smart/GroupV1MigrationDialog';
|
||||||
import { SmartGroupV1MigrationDialog } from '../smart/GroupV1MigrationDialog';
|
import { SmartGroupV1MigrationDialog } from '../smart/GroupV1MigrationDialog';
|
||||||
|
|
||||||
|
@ -14,13 +13,9 @@ export const createGroupV1MigrationModal = (
|
||||||
store: Store,
|
store: Store,
|
||||||
props: PropsType
|
props: PropsType
|
||||||
): React.ReactElement => {
|
): React.ReactElement => {
|
||||||
const { onClose } = props;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<ModalHost onClose={onClose}>
|
<SmartGroupV1MigrationDialog {...props} />
|
||||||
<SmartGroupV1MigrationDialog {...props} />
|
|
||||||
</ModalHost>
|
|
||||||
</Provider>
|
</Provider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue