fix: use folder project title in web rows
This commit is contained in:
@@ -358,7 +358,7 @@ export function getConversationListItemPresentation(conversation: ConversationIt
|
||||
isFolderArchive && conversation.folderKey
|
||||
? `/conversations/folders/${encodeURIComponent(conversation.folderKey)}`
|
||||
: `/conversations/${conversation.projectId}`,
|
||||
title: isFolderArchive ? conversation.threadTitle : conversation.projectTitle,
|
||||
title: conversation.projectTitle,
|
||||
subtitle: isFolderArchive ? conversation.folderLabel : conversation.deviceNamesPreview.join(" / "),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -424,9 +424,13 @@ test("folder archive homepage rows keep the project title, compact subtitle, and
|
||||
const folder = getConversationHomeItems(state).find((item) => item.conversationType === "folder_archive");
|
||||
|
||||
assert.ok(folder, "expected grouped folder archive item");
|
||||
const presentation = getConversationListItemPresentation(folder!);
|
||||
const presentation = getConversationListItemPresentation({
|
||||
...folder!,
|
||||
projectTitle: "项目标题",
|
||||
threadTitle: "线程标题",
|
||||
});
|
||||
|
||||
assert.equal(presentation.title, "Boss");
|
||||
assert.equal(presentation.title, "项目标题");
|
||||
assert.equal(presentation.subtitle, "2 个线程 · 最近:发布回滚");
|
||||
assert.equal(presentation.href, "/conversations/folders/mac-studio%3Aboss");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user