decord/source/modules/conversations/components/native/ConversationFocusScreen.tsx

50 lines
2 KiB
TypeScript
Raw Normal View History

// Module ID: 13405
// Function ID: 13406
2026-07-20 16:05:17 +00:00
// Name: ConversationFocusScreen
// Dependencies: [19, 7712, 21, 1487, 504, 13406, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 13405 (ConversationFocusScreen)
import noop from "module_19" /* 19 */;
import ConversationsStore from "ConversationsStore" /* 7712 */;
2026-07-23 10:11:24 +00:00
const require = fn;
const jsx = fn(21).jsx;
const size = fn(2);
const result = size.fileFinishedImporting("modules/conversations/components/native/ConversationFocusScreen.tsx");
2026-07-20 16:05:17 +00:00
export default function ConversationFocusScreen() {
const params = channelId(1487).useRoute().params;
2026-07-23 10:11:24 +00:00
channelId = params.channelId;
const conversationId = params.conversationId;
const obj = channelId(1487);
const items = [ConversationsStore];
2026-07-20 16:05:17 +00:00
const items1 = [channelId, conversationId];
const messages = channelId(504).useStateFromStores(items, () => ConversationsStore.getHydratedMessages(channelId, conversationId), items1);
let obj2 = channelId(504);
const items2 = [ConversationsStore];
2026-07-20 16:05:17 +00:00
const items3 = [channelId, conversationId];
const stateFromStoresObject = channelId(504).useStateFromStoresObject(items2, () => {
const conversationMetadata = ConversationsStore.getConversationMetadata(channelId, conversationId);
2026-07-29 08:29:29 +00:00
let flag;
if (conversationMetadata != null) {
flag = conversationMetadata.fullyHydrated;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (flag == null) {
flag = false;
}
const obj2 = { fullyHydrated: flag, isFullFetchPending: ConversationsStore.isConversationFetchPending(conversationId, true), startMessageId: null };
let startMessageId;
2026-07-29 08:29:29 +00:00
if (conversationMetadata != null) {
2026-07-20 16:05:17 +00:00
startMessageId = conversationMetadata.conversation.startMessageId;
}
2026-07-29 08:29:29 +00:00
if (startMessageId == null) {
startMessageId = null;
2026-07-20 16:05:17 +00:00
}
obj2.startMessageId = startMessageId;
return obj2;
2026-07-20 16:05:17 +00:00
}, items3);
({ fullyHydrated, isFullFetchPending, startMessageId } = stateFromStoresObject);
return jsx(conversationId(13406), { channelId, conversationId, messages, fullyHydrated, isFullFetchPending, startMessageId });
2026-07-20 16:05:17 +00:00
};