Default disappearing message timeout fixes

This commit is contained in:
Fedor Indutny 2021-06-25 16:52:56 -07:00 committed by GitHub
parent c9415dcf67
commit cd28e71bc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 456 additions and 164 deletions

View file

@ -126,6 +126,7 @@ const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
setComposeSearchTerm: action('setComposeSearchTerm'),
setComposeGroupAvatar: action('setComposeGroupAvatar'),
setComposeGroupName: action('setComposeGroupName'),
setComposeGroupExpireTimer: action('setComposeGroupExpireTimer'),
showArchivedConversations: action('showArchivedConversations'),
showInbox: action('showInbox'),
startComposing: action('startComposing'),
@ -514,3 +515,53 @@ story.add('Captcha dialog: pending', () => (
})}
/>
));
// Set group metadata
story.add('Group Metadata: No Timer', () => (
<LeftPane
{...createProps({
modeSpecificProps: {
mode: LeftPaneMode.SetGroupMetadata,
groupAvatar: undefined,
groupName: 'Group 1',
groupExpireTimer: 0,
hasError: false,
isCreating: false,
selectedContacts: defaultConversations,
},
})}
/>
));
story.add('Group Metadata: Regular Timer', () => (
<LeftPane
{...createProps({
modeSpecificProps: {
mode: LeftPaneMode.SetGroupMetadata,
groupAvatar: undefined,
groupName: 'Group 1',
groupExpireTimer: 24 * 3600,
hasError: false,
isCreating: false,
selectedContacts: defaultConversations,
},
})}
/>
));
story.add('Group Metadata: Custom Timer', () => (
<LeftPane
{...createProps({
modeSpecificProps: {
mode: LeftPaneMode.SetGroupMetadata,
groupAvatar: undefined,
groupName: 'Group 1',
groupExpireTimer: 7 * 3600,
hasError: false,
isCreating: false,
selectedContacts: defaultConversations,
},
})}
/>
));