decord/beta/source/modules/conversations/native/createConversationHeader.tsx

49 lines
2.1 KiB
TypeScript
Raw Permalink Normal View History

2026-10-12 16:32:48 +00:00
// Module ID: 11623
// Function ID: 11624
// Name: createConversationHeader
2026-10-12 16:32:48 +00:00
// Dependencies: [7748, 7891, 11624, 1126, 3751, 9599, 2]
2026-10-07 22:43:51 +00:00
// Exports: default, findConversationHeaderRowIndex, isConversationStartMessage
2026-10-12 16:32:48 +00:00
// Module 11623 (createConversationHeader)
2026-10-07 22:43:51 +00:00
import intl2 from "intl" /* 1126 */;
2026-10-12 16:32:48 +00:00
import _modDef3751 from "module_3751" /* 3751 */;
import renderer_EmbedUtils from "renderer/EmbedUtils" /* 7891 */;
import computeScrollData from "computeScrollData" /* 9599 */;
import AssetRegistryDefault from "AssetRegistry" /* 11624 */;
import RowGeneratorConstants from "RowGeneratorConstants" /* 7748 */;
import size from "module_2" /* 2 */;
2026-10-07 22:43:51 +00:00
let c3;
let closure_4;
({ RowType: c3, SeparatorType: closure_4 } = RowGeneratorConstants);
const result = size.fileFinishedImporting("modules/conversations/native/createConversationHeader.tsx");
2026-10-07 22:43:51 +00:00
export default function createConversationHeader(conversationId) {
2026-10-01 14:13:23 +00:00
let intl;
let obj2;
2026-10-12 16:32:48 +00:00
const obj = { conversationId: conversationId.id, channelId: conversationId.channelId, startMessageId: conversationId.startMessageId, title: conversationId.title, expandIconUrl: obj2.getAssetUriForEmbed(AssetRegistryDefault), expandAccessibilityLabel: intl.string(_modDef3751.pU5Dut) };
2026-10-07 22:43:51 +00:00
obj2 = renderer_EmbedUtils;
intl = intl2.intl;
return obj;
};
export const isConversationStartMessage = function isConversationStartMessage(startMessageId, id) {
2026-10-07 22:43:51 +00:00
return startMessageId.startMessageId === id && startMessageId.messageCount > 1;
};
export const findConversationHeaderRowIndex = function findConversationHeaderRowIndex(previousRows, startMessageId) {
const obj = computeScrollData;
const findMessageRowIndexResult = obj.findMessageRowIndex(previousRows, startMessageId.startMessageId);
if (null != findMessageRowIndexResult) {
let type;
if (previousRows[findMessageRowIndexResult + 1] != null) {
type = tmp2.type;
}
let sum;
if (type === constants.SEPARATOR) {
if (previousRows[findMessageRowIndexResult + 1].id === constants2.CONVERSATION) {
sum = findMessageRowIndexResult + 1;
}
}
return sum;
}
};