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

49 lines
2.1 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 11575
// Function ID: 11576
// Name: createConversationHeader
2026-10-09 10:00:15 +00:00
// Dependencies: [7729, 7872, 11576, 1126, 3729, 9569, 2]
// Exports: default, findConversationHeaderRowIndex, isConversationStartMessage
2026-10-09 10:00:15 +00:00
// Module 11575 (createConversationHeader)
2026-10-03 08:58:59 +00:00
import intl2 from "intl" /* 1126 */;
2026-10-08 09:57:35 +00:00
import _modDef3729 from "module_3729" /* 3729 */;
2026-10-09 10:00:15 +00:00
import renderer_EmbedUtils from "renderer/EmbedUtils" /* 7872 */;
import computeScrollData from "computeScrollData" /* 9569 */;
import AssetRegistryDefault from "AssetRegistry" /* 11576 */;
import RowGeneratorConstants from "RowGeneratorConstants" /* 7729 */;
import size from "module_2" /* 2 */;
2026-10-03 08:58:59 +00:00
let c3;
let closure_4;
({ RowType: c3, SeparatorType: closure_4 } = RowGeneratorConstants);
const result = size.fileFinishedImporting("modules/conversations/native/createConversationHeader.tsx");
export default function createConversationHeader(conversationId) {
2026-10-03 08:58:59 +00:00
let intl;
let obj2;
2026-10-08 09:57:35 +00:00
const obj = { conversationId: conversationId.id, channelId: conversationId.channelId, startMessageId: conversationId.startMessageId, title: conversationId.title, expandIconUrl: obj2.getAssetUriForEmbed(AssetRegistryDefault), expandAccessibilityLabel: intl.string(_modDef3729.pU5Dut) };
2026-10-03 08:58:59 +00:00
obj2 = renderer_EmbedUtils;
intl = intl2.intl;
return obj;
};
export const isConversationStartMessage = function isConversationStartMessage(startMessageId, id) {
2026-10-03 08:58:59 +00:00
return startMessageId.startMessageId === id && startMessageId.messageCount > 1;
};
export const findConversationHeaderRowIndex = function findConversationHeaderRowIndex(previousRows, startMessageId) {
2026-10-03 08:58:59 +00:00
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) {
2026-10-03 08:58:59 +00:00
if (previousRows[findMessageRowIndexResult + 1].id === constants2.CONVERSATION) {
sum = findMessageRowIndexResult + 1;
}
}
return sum;
}
};