Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
216 lines
6.8 KiB
TypeScript
216 lines
6.8 KiB
TypeScript
// Module ID: 11566
|
|
// Function ID: 11567
|
|
// Name: NativeChatUtils
|
|
// Dependencies: [17, 1364, 11567, 1231, 11568, 11569, 2]
|
|
|
|
// Module 11566 (NativeChatUtils)
|
|
import SentryUtilsDefault from "SentryUtils" /* 1231 */;
|
|
import PlatformUtils from "PlatformUtils" /* 1364 */;
|
|
import ChatNativeComponent from "ChatNativeComponent" /* 11567 */;
|
|
import NativeChatModuleDefault from "NativeChatModule" /* 11569 */;
|
|
import get_ActivityIndicator from "module_17" /* 17 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
({ NativeModules: c3, findNodeHandle: closure_4 } = get_ActivityIndicator);
|
|
const ChatScrollPosition = { TOP: 0, [0]: "TOP", MIDDLE: 1, [1]: "MIDDLE", BOTTOM: 2, [2]: "BOTTOM", NONE: 3, [3]: "NONE" };
|
|
let result = size.fileFinishedImporting("modules/chat/native/NativeChatUtils.tsx");
|
|
|
|
export default {
|
|
scrollTo(arg0, arg1, arg2) {
|
|
if (null != arg0) {
|
|
let obj = arg2;
|
|
if (arg2 == null) {
|
|
obj = {};
|
|
}
|
|
const animated = obj.animated;
|
|
const highlight = obj.highlight;
|
|
let TOP = obj.position;
|
|
if (undefined === TOP) {
|
|
TOP = obj.TOP;
|
|
}
|
|
if (obj2.isIOS()) {
|
|
const tmp15 = React4(arg0);
|
|
if (null != tmp15) {
|
|
const DCDChatManager = React3.DCDChatManager;
|
|
DCDChatManager.scrollTo(tmp15, arg1, tmp, tmp2, TOP);
|
|
}
|
|
} else {
|
|
const Commands = tmp5(11567).Commands;
|
|
Commands.scrollTo(arg0, arg1, tmp, tmp2, TOP);
|
|
}
|
|
obj2 = PlatformUtils;
|
|
tmp5 = require;
|
|
}
|
|
},
|
|
scrollToBottom(arg0, arg1) {
|
|
if (null != arg0) {
|
|
if (obj.isIOS()) {
|
|
const tmp6 = React4(arg0);
|
|
if (null != tmp6) {
|
|
const DCDChatManager = React3.DCDChatManager;
|
|
DCDChatManager.scrollToBottom(tmp6, arg1);
|
|
}
|
|
} else {
|
|
const Commands = tmp2(11567).Commands;
|
|
Commands.scrollToBottom(arg0, arg1);
|
|
}
|
|
obj = PlatformUtils;
|
|
tmp2 = require;
|
|
}
|
|
},
|
|
scrollToTop(arg0, arg1) {
|
|
if (null != arg0) {
|
|
if (obj.isIOS()) {
|
|
const tmp4 = React4(arg0);
|
|
if (null != tmp4) {
|
|
const DCDChatManager = React3.DCDChatManager;
|
|
DCDChatManager.scrollToTop(tmp4, arg1);
|
|
}
|
|
}
|
|
obj = PlatformUtils;
|
|
}
|
|
},
|
|
scrollToRelativeOffset(arg0, arg1, arg2) {
|
|
if (null != arg0) {
|
|
if (obj.isIOS()) {
|
|
const tmp4 = React4(arg0);
|
|
if (null != tmp4) {
|
|
const DCDChatManager = React3.DCDChatManager;
|
|
const result = DCDChatManager.scrollToRelativeOffset(tmp4, arg1, arg2);
|
|
}
|
|
}
|
|
obj = PlatformUtils;
|
|
}
|
|
},
|
|
scrollIntoView(arg0, arg1, arg2) {
|
|
if (null != arg0) {
|
|
let obj = arg2;
|
|
if (arg2 == null) {
|
|
obj = {};
|
|
}
|
|
const animated = obj.animated;
|
|
const highlight = obj.highlight;
|
|
if (obj2.isIOS()) {
|
|
const tmp13 = React4(arg0);
|
|
if (null != tmp13) {
|
|
const DCDChatManager = React3.DCDChatManager;
|
|
DCDChatManager.scrollIntoView(tmp13, arg1, tmp, tmp2);
|
|
}
|
|
} else {
|
|
const Commands = tmp4(11567).Commands;
|
|
Commands.scrollIntoView(arg0, arg1, tmp, tmp2);
|
|
}
|
|
obj2 = PlatformUtils;
|
|
tmp4 = require;
|
|
}
|
|
},
|
|
updateRows(arg0, rows) {
|
|
if (null != arg0) {
|
|
if (obj6.isIOS()) {
|
|
const andIncrementChangesetIdForChat = tmp31(11568).getAndIncrementChangesetIdForChat(arg0);
|
|
({ rows, forceReload } = rows);
|
|
if (forceReload == null) {
|
|
forceReload = false;
|
|
}
|
|
const tmp31Result = tmp31(11568);
|
|
const obj = { category: "chat.dispatch", message: null, data: null };
|
|
const _HermesInternal = HermesInternal;
|
|
obj.message = "updateRows dispatch id=" + andIncrementChangesetIdForChat + " ops=" + rows.length;
|
|
const obj2 = { changesetUpdateId: andIncrementChangesetIdForChat, opCount: rows.length, rows, forceReload };
|
|
obj.data = obj2;
|
|
SentryUtilsDefault.addBreadcrumb(obj);
|
|
const Commands = tmp31(11567).Commands;
|
|
const _JSON2 = JSON;
|
|
const json = JSON.stringify(rows.rows);
|
|
const isLoadingAtTop = rows.isLoadingAtTop;
|
|
let str3 = "";
|
|
if (null != rows.scrollData) {
|
|
const _JSON3 = JSON;
|
|
str3 = JSON.stringify(rows.scrollData);
|
|
}
|
|
let flag4 = rows.HACK_iOSForceAnimations;
|
|
if (flag4 == null) {
|
|
flag4 = false;
|
|
}
|
|
let flag5 = rows.forceReload;
|
|
if (flag5 == null) {
|
|
flag5 = false;
|
|
}
|
|
let flag6 = rows.isAnimated;
|
|
if (flag6 == null) {
|
|
flag6 = true;
|
|
}
|
|
Commands.updateRows(arg0, json, isLoadingAtTop, str3, andIncrementChangesetIdForChat, flag4, flag5, flag6);
|
|
} else {
|
|
const tmp2 = React4(arg0);
|
|
if (null != tmp2) {
|
|
const obj7 = NativeChatModuleDefault;
|
|
const _JSON4 = JSON;
|
|
const json1 = JSON.stringify(rows.rows);
|
|
const isLoadingAtTop2 = rows.isLoadingAtTop;
|
|
let json2 = null;
|
|
if (null != rows.scrollData) {
|
|
const _JSON = JSON;
|
|
json2 = JSON.stringify(rows.scrollData);
|
|
}
|
|
const andIncrementChangesetIdForChat1 = tmp31(11568).getAndIncrementChangesetIdForChat(arg0);
|
|
let flag = rows.HACK_iOSForceAnimations;
|
|
if (flag == null) {
|
|
flag = false;
|
|
}
|
|
let flag2 = rows.forceReload;
|
|
if (flag2 == null) {
|
|
flag2 = false;
|
|
}
|
|
let flag3 = rows.isAnimated;
|
|
if (flag3 == null) {
|
|
flag3 = true;
|
|
}
|
|
obj7.updateRows(tmp2, json1, isLoadingAtTop2, json2, andIncrementChangesetIdForChat1, flag, flag2, flag3);
|
|
const tmp31Result2 = tmp31(11568);
|
|
}
|
|
}
|
|
obj6 = PlatformUtils;
|
|
}
|
|
},
|
|
clearRows(arg0) {
|
|
if (null != arg0) {
|
|
if (obj4.isIOS()) {
|
|
const Commands = tmp6(11567).Commands;
|
|
Commands.clearRows(arg0, tmp6(11568).getAndIncrementChangesetIdForChat(arg0));
|
|
const tmp6Result = tmp6(11568);
|
|
} else {
|
|
const tmp2 = React4(arg0);
|
|
if (null != tmp2) {
|
|
const obj = NativeChatModuleDefault;
|
|
obj.clearRows(tmp2, tmp6(11568).getAndIncrementChangesetIdForChat(arg0));
|
|
const tmp6Result2 = tmp6(11568);
|
|
}
|
|
}
|
|
obj4 = PlatformUtils;
|
|
}
|
|
},
|
|
fadeIn(arg0) {
|
|
let isIOSResult = null != arg0;
|
|
if (isIOSResult) {
|
|
isIOSResult = PlatformUtils.isIOS();
|
|
}
|
|
if (isIOSResult) {
|
|
const Commands = ChatNativeComponent.Commands;
|
|
Commands.fadeIn(arg0);
|
|
}
|
|
},
|
|
focus(arg0, arg1) {
|
|
if (obj.isIOS()) {
|
|
if (null != arg0) {
|
|
const tmp4 = React4(arg0);
|
|
if (null != tmp4) {
|
|
const DCDChatManager = React3.DCDChatManager;
|
|
DCDChatManager.focus(tmp4, arg1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
export { ChatScrollPosition };
|
|
export const ChatScrollType = { SCROLL: 0, [0]: "SCROLL", FOCUS_ONLY: 1, [1]: "FOCUS_ONLY" };
|