Fixes no group description unless admin

This commit is contained in:
Josh Perez 2021-08-26 17:12:07 -04:00 committed by GitHub
parent 9f87543388
commit c6b4f14f3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 1 deletions

View File

@ -27,6 +27,7 @@ const createConversation = (): ConversationType =>
type: 'group',
lastUpdated: 0,
title: text('conversation title', 'Some Conversation'),
groupDescription: text('description', 'This is a group description'),
});
const createProps = (overrideProps: Partial<Props> = {}): Props => ({
@ -49,3 +50,31 @@ story.add('Editable', () => {
return <ConversationDetailsHeader {...props} />;
});
story.add('Basic no-description', () => {
const props = createProps();
return (
<ConversationDetailsHeader
{...props}
conversation={getDefaultConversation({
title: 'My Group',
type: 'group',
})}
/>
);
});
story.add('Editable no-description', () => {
const props = createProps({ canEdit: true });
return (
<ConversationDetailsHeader
{...props}
conversation={getDefaultConversation({
title: 'My Group',
type: 'group',
})}
/>
);
});

View File

@ -118,6 +118,7 @@ export const ConversationDetailsHeader: React.ComponentType<Props> = ({
{avatarLightbox}
{avatar}
{contents}
<div className={bem('subtitle')}>{subtitle}</div>
</div>
);
};

View File

@ -568,7 +568,7 @@ export async function mergeGroupV1Record(
// still V1, because the storageItem that we'll put into manifest will have
// a different record type.
window.log.info(
'storageService.mergeGroupV1Record marking v1 ' +
'storageService.mergeGroupV1Record marking v1' +
' group for an update to v2',
conversation.idForLogging()
);