Order receipts with the most recent on the right (#8506)
This commit is contained in:
parent
3a63c88a11
commit
b12c002602
2 changed files with 29 additions and 29 deletions
|
@ -52,11 +52,11 @@ interface IAvatarPosition {
|
|||
position: number;
|
||||
}
|
||||
|
||||
export function determineAvatarPosition(index: number, count: number, max: number): IAvatarPosition {
|
||||
export function determineAvatarPosition(index: number, max: number): IAvatarPosition {
|
||||
if (index < max) {
|
||||
return {
|
||||
hidden: false,
|
||||
position: Math.min(count, max) - index - 1,
|
||||
position: index,
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
|
@ -133,7 +133,7 @@ export function ReadReceiptGroup(
|
|||
}
|
||||
|
||||
const avatars = readReceipts.map((receipt, index) => {
|
||||
const { hidden, position } = determineAvatarPosition(index, readReceipts.length, maxAvatars);
|
||||
const { hidden, position } = determineAvatarPosition(index, maxAvatars);
|
||||
|
||||
const userId = receipt.userId;
|
||||
let readReceiptInfo: IReadReceiptInfo;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue