Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
chore: fix comment amount
Stevenf9f277695df7
diff --git a/web/src/components/MemoView.tsx b/web/src/components/MemoView.tsxindex 8b74a6970..fc61df269 100644--- a/web/src/components/MemoView.tsx+++ b/web/src/components/MemoView.tsx@@ -43,7 +43,9 @@ const MemoView: React.FC<Props> = (props: Props) => {const [creator, setCreator] = useState(userStore.getUserByUsername(extractUsernameFromName(memo.creator)));const memoContainerRef = useRef<HTMLDivElement>(null);const referencedMemos = memo.relations.filter((relation) => relation.type === MemoRelation_Type.REFERENCE);- const commentAmount = memo.relations.filter((relation) => relation.type === MemoRelation_Type.COMMENT).length;+ const commentAmount = memo.relations.filter(+ (relation) => relation.type === MemoRelation_Type.COMMENT && relation.relatedMemoId === memo.id,+ ).length;const readonly = memo.creator !== user?.name;// Initial related data: creator.