diff --git a/src/renderer/src/modules/entry-content/read-history.tsx b/src/renderer/src/modules/entry-content/read-history.tsx index dc5f5dc83..f373c7f6e 100644 --- a/src/renderer/src/modules/entry-content/read-history.tsx +++ b/src/renderer/src/modules/entry-content/read-history.tsx @@ -35,13 +35,22 @@ export const EntryReadHistory: Component<{ entryId: string }> = ({ ))} - {entryHistory.readCount && entryHistory.readCount > 10 && ( + {entryHistory.readCount && + entryHistory.readCount > 10 && + entryHistory.userIds && + entryHistory.userIds.length >= 10 && ( - -
- + +
+ + - {entryHistory.readCount - 10} + {Math.min(entryHistory.readCount - 10, 99)}
@@ -52,29 +61,28 @@ export const EntryReadHistory: Component<{ entryId: string }> = ({ ) } -const EntryUser: Component<{ userId: string, i: number }> = ({ userId, i }) => { +const EntryUser: Component<{ + userId: string + i: number +}> = ({ userId, i }) => { const user = useUserById(userId) if (!user) return null return ( - -
- - - {user.name?.slice(0, 2)} - -
+ + + + {user.name?.slice(0, 2)} + Recent reader: - {" "} - {user.name}