Fix missing avatars in groups

This commit is contained in:
Evan Hahn 2021-01-27 15:15:43 -06:00 committed by GitHub
parent a8787e7c9e
commit 1da724edf2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 182 additions and 92 deletions

View file

@ -1,4 +1,4 @@
// Copyright 2020 Signal Messenger, LLC
// Copyright 2020-2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import * as React from 'react';
@ -201,7 +201,7 @@ story.add('Older', () => {
return renderBothDirections(props);
});
story.add('Reactions', () => {
story.add('Reactions (wider message)', () => {
const props = createProps({
text: 'Hello there from a pal!',
timestamp: Date.now() - 180 * 24 * 60 * 60 * 1000,
@ -293,6 +293,98 @@ story.add('Reactions', () => {
return renderBothDirections(props);
});
story.add('Reactions (short message)', () => {
const props = createProps({
text: 'h',
timestamp: Date.now(),
reactions: [
{
emoji: '👍',
from: {
isMe: true,
id: '+14155552672',
phoneNumber: '+14155552672',
name: 'Me',
title: 'Me',
},
timestamp: Date.now(),
},
{
emoji: '👍',
from: {
id: '+14155552672',
phoneNumber: '+14155552672',
name: 'Amelia Briggs',
title: 'Amelia',
},
timestamp: Date.now(),
},
{
emoji: '👍',
from: {
id: '+14155552673',
phoneNumber: '+14155552673',
name: 'Amelia Briggs',
title: 'Amelia',
},
timestamp: Date.now(),
},
{
emoji: '😂',
from: {
id: '+14155552674',
phoneNumber: '+14155552674',
name: 'Amelia Briggs',
title: 'Amelia',
},
timestamp: Date.now(),
},
{
emoji: '😂',
from: {
id: '+14155552676',
phoneNumber: '+14155552676',
name: 'Amelia Briggs',
title: 'Amelia',
},
timestamp: Date.now(),
},
{
emoji: '😡',
from: {
id: '+14155552677',
phoneNumber: '+14155552677',
name: 'Amelia Briggs',
title: 'Amelia',
},
timestamp: Date.now(),
},
{
emoji: '👎',
from: {
id: '+14155552678',
phoneNumber: '+14155552678',
name: 'Amelia Briggs',
title: 'Amelia',
},
timestamp: Date.now(),
},
{
emoji: '❤️',
from: {
id: '+14155552679',
phoneNumber: '+14155552679',
name: 'Amelia Briggs',
title: 'Amelia',
},
timestamp: Date.now(),
},
],
});
return renderBothDirections(props);
});
story.add('Avatar in Group', () => {
const props = createProps({
authorAvatarPath: pngUrl,