Changeset View
Changeset View
Standalone View
Standalone View
lib/shared/thread-utils.js
Show First 20 Lines • Show All 1,099 Lines • ▼ Show 20 Lines | |||||
// Consider updating itemHeight in native/chat/chat-thread-list.react.js | // Consider updating itemHeight in native/chat/chat-thread-list.react.js | ||||
// if you change this | // if you change this | ||||
const emptyItemText: string = | const emptyItemText: string = | ||||
`Background chats are just like normal chats, except they don't ` + | `Background chats are just like normal chats, except they don't ` + | ||||
`contribute to your unread count.\n\n` + | `contribute to your unread count.\n\n` + | ||||
`To move a chat over here, switch the “Background” option in its settings.`; | `To move a chat over here, switch the “Background” option in its settings.`; | ||||
function threadNoun(threadType: ThreadType): string { | function threadNoun(threadType: ThreadType, parentThreadID: ?string): string { | ||||
if (threadType === threadTypes.SIDEBAR) { | if (threadType === threadTypes.SIDEBAR) { | ||||
return 'thread'; | return 'thread'; | ||||
} else if ( | } else if ( | ||||
threadType === threadTypes.COMMUNITY_SECRET_SUBTHREAD && | |||||
parentThreadID === genesis.id | |||||
) { | |||||
return 'chat'; | |||||
} else if ( | |||||
threadType === threadTypes.COMMUNITY_ROOT || | threadType === threadTypes.COMMUNITY_ROOT || | ||||
threadType === threadTypes.COMMUNITY_ANNOUNCEMENT_ROOT || | threadType === threadTypes.COMMUNITY_ANNOUNCEMENT_ROOT || | ||||
threadType === threadTypes.COMMUNITY_OPEN_SUBTHREAD || | threadType === threadTypes.COMMUNITY_OPEN_SUBTHREAD || | ||||
threadType === threadTypes.COMMUNITY_OPEN_ANNOUNCEMENT_SUBTHREAD || | threadType === threadTypes.COMMUNITY_OPEN_ANNOUNCEMENT_SUBTHREAD || | ||||
threadType === threadTypes.COMMUNITY_SECRET_SUBTHREAD || | threadType === threadTypes.COMMUNITY_SECRET_SUBTHREAD || | ||||
threadType === threadTypes.COMMUNITY_SECRET_ANNOUNCEMENT_SUBTHREAD || | threadType === threadTypes.COMMUNITY_SECRET_ANNOUNCEMENT_SUBTHREAD || | ||||
threadType === threadTypes.GENESIS | threadType === threadTypes.GENESIS | ||||
) { | ) { | ||||
▲ Show 20 Lines • Show All 530 Lines • Show Last 20 Lines |