decord/alpha/source/modules/vibegrations/native/useAckVibegrationsAppChannelChat.tsx
github-actions 72019a2d0c chore: update source for alpha 348.4
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5014.js (118.4 MB)
2026-09-25 08:38:05 +00:00

70 lines
2.5 KiB
TypeScript

// Module ID: 12813
// Function ID: 12814
// Name: useAckVibegrationsAppChannelChat
// Dependencies: [19, 5049, 4844, 1979, 1074, 504, 573, 2]
// Exports: default
// Module 12813 (useAckVibegrationsAppChannelChat)
import DispatcherDefault from "Dispatcher" /* 573 */;
import noop from "module_19" /* 19 */;
import MessageStore from "MessageStore" /* 5049 */;
import ReadStateStore from "ReadStateStore" /* 4844 */;
import AppStateStore from "AppStateStore" /* 1979 */;
const require = globalThis.__r;
const require = fn;
const Constants = fn(1074);
({ AnalyticsObjects: closure_7, AnalyticsObjectTypes: closure_8, AnalyticsSections: closure_9, AppStates: c10 } = Constants);
const size = fn(2);
const result = size.fileFinishedImporting("modules/vibegrations/native/useAckVibegrationsAppChannelChat.tsx");
export default function useAckVibegrationsAppChannelChat(arg0, arg1) {
_require = arg0;
closure_1 = arg1;
const items = [ReadStateStore];
const items1 = [arg0];
stateFromStores = require("initialize").useStateFromStores(items, () => {
let hasUnreadOrMentionsResult = null != closure_0;
if (hasUnreadOrMentionsResult) {
hasUnreadOrMentionsResult = ReadStateStore.hasUnreadOrMentions(tmp.id);
}
return hasUnreadOrMentionsResult;
}, items1);
let obj = require("initialize");
const items2 = [stateFromStores2];
const items3 = [arg0];
const stateFromStores1 = require("initialize").useStateFromStores(items2, () => {
if (null == closure_0) {
return false;
} else {
const messages = MessageStore.getMessages(tmp.id);
return messages.ready && !messages.loadingMore;
}
}, items3);
let obj2 = require("initialize");
const items4 = [AppStateStore];
stateFromStores2 = require("initialize").useStateFromStores(items4, () => state.getState() === constants.ACTIVE);
const items5 = [arg0, arg1, stateFromStores, stateFromStores1, stateFromStores2];
const effect = stateFromStores1.useEffect(() => {
let tmp2 = null != id;
if (tmp2) {
tmp2 = closure_1;
}
if (tmp2) {
tmp2 = stateFromStores;
}
if (tmp2) {
tmp2 = stateFromStores1;
}
if (tmp2) {
tmp2 = stateFromStores2;
}
if (tmp2) {
const obj2 = { type: "TRY_ACK", channelId: id.id, location: null };
const obj3 = { section: constants3.CHANNEL, object: constants.ACK_MESSAGE_VIEWED, objectType: constants2.ACK_AUTOMATIC };
obj2.location = obj3;
DispatcherDefault.dispatch(obj2);
}
}, items5);
};