shouldCurrentMessageHideMetadata: Hide more often for less jumpiness
This commit is contained in:
parent
16f0f4262a
commit
97b03d8803
2 changed files with 3 additions and 8 deletions
|
@ -217,7 +217,7 @@ describe('<Timeline> utilities', () => {
|
|||
assert.isTrue(shouldCurrentMessageHideMetadata(true, current, newer));
|
||||
});
|
||||
|
||||
it('returns true if all three have delivered status or above', () => {
|
||||
it('returns true if both have delivered status or above', () => {
|
||||
assert.isTrue(
|
||||
shouldCurrentMessageHideMetadata(true, defaultCurrent, defaultNewer)
|
||||
);
|
||||
|
|
|
@ -88,18 +88,13 @@ export function shouldCurrentMessageHideMetadata(
|
|||
case 'sending':
|
||||
return false;
|
||||
case 'sent':
|
||||
return newerMessage.status === 'sent';
|
||||
case 'delivered':
|
||||
case 'read':
|
||||
case 'viewed':
|
||||
return (
|
||||
newerMessage.status === 'delivered' ||
|
||||
newerMessage.status === 'read' ||
|
||||
newerMessage.status === 'viewed'
|
||||
);
|
||||
return true;
|
||||
default:
|
||||
log.error(missingCaseError(message.status));
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue