decord/source/modules/safety_flows/native/SafetyFlowsUtils.tsx

79 lines
2.6 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 16610
// Function ID: 129528
2026-07-20 16:05:17 +00:00
// Name: getScreensForTaskType
2026-07-24 07:16:23 +00:00
// Dependencies: [5, 31, 1849, 16604, 16606, 4337, 16605, 3831, 10361, 1212, 2460, 1456, 16609, 2]
2026-07-20 16:05:17 +00:00
// Exports: useOnTaskComplete
2026-07-24 07:16:23 +00:00
// Module 16610 (getScreensForTaskType)
2026-07-23 10:11:24 +00:00
import module_4337 from "module_4337";
import result from "result";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
const require = arg1;
2026-07-20 16:05:17 +00:00
function getScreensForTaskType(task_type) {
2026-07-24 07:16:23 +00:00
const tmp = require(16604) /* TaskType */.TASK_TYPE_TO_SCREENS[task_type];
2026-07-20 16:05:17 +00:00
let tmp2 = null;
if (null != tmp) {
let tmp5 = tmp;
2026-07-24 07:16:23 +00:00
if (task_type === require(16604) /* TaskType */.TaskType.EMAIL_VERIFICATION) {
2026-07-23 10:11:24 +00:00
currentUser = currentUser.getCurrentUser();
2026-07-20 16:05:17 +00:00
let email;
if (null != currentUser) {
email = currentUser.email;
}
tmp5 = tmp;
if (null != email) {
2026-07-24 07:16:23 +00:00
const items = [require(16604) /* TaskType */.SafetyFlowScreens.VERIFY_EMAIL];
2026-07-20 16:05:17 +00:00
tmp5 = items;
}
}
tmp2 = tmp5;
}
return tmp2;
}
function fetchAndUpdateTask() {
return _fetchAndUpdateTask(...arguments);
}
function _fetchAndUpdateTask() {
// CreateGeneratorClosureLongIndex (0x67)
const obj = callback(tmp);
return obj(...arguments);
}
function navigateToScreenForTask(arr, task_type) {
if (null == task_type) {
2026-07-23 10:11:24 +00:00
let obj = importDefault(4337);
2026-07-24 07:16:23 +00:00
obj.popWithKey(require(16605) /* SAFETY_FLOWS_MODAL_KEY */.SAFETY_FLOWS_MODAL_KEY);
obj = { key: "SAFETY_FLOWS_VERIFY_EMAIL_SUCCESS", icon: importDefault(10361) };
2026-07-23 10:11:24 +00:00
const intl = require(1212) /* getSystemLocale */.intl;
obj.content = intl.string(importDefault(2460)["/fHz9S"]);
importDefault(3831).open(obj);
2026-07-20 16:05:17 +00:00
} else {
const tmp2 = getScreensForTaskType(task_type.task_type);
if (null != tmp2) {
arr.push(tmp2[0]);
} else {
2026-07-24 07:16:23 +00:00
arr.push(require(16604) /* TaskType */.SafetyFlowScreens.UPDATE_APP);
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-23 10:11:24 +00:00
const result = require("_isNativeReflectConstruct").fileFinishedImporting("modules/safety_flows/native/SafetyFlowsUtils.tsx");
2026-07-20 16:05:17 +00:00
export { getScreensForTaskType };
export { fetchAndUpdateTask };
export { navigateToScreenForTask };
export const useOnTaskComplete = function useOnTaskComplete() {
2026-07-23 10:11:24 +00:00
navigation = navigation(setTask[11]).useNavigation();
const obj = navigation(setTask[11]);
const safetyFlowTask = navigation(setTask[12]).useSafetyFlowTask();
2026-07-20 16:05:17 +00:00
const task = safetyFlowTask.task;
2026-07-23 10:11:24 +00:00
setTask = safetyFlowTask.setTask;
2026-07-20 16:05:17 +00:00
const items = [navigation, task, setTask];
2026-07-23 10:11:24 +00:00
return React.useCallback((() => {
2026-07-20 16:05:17 +00:00
// CreateGeneratorClosureLongIndex (0x67)
2026-07-23 10:11:24 +00:00
let closure_0 = outer1_3(tmp);
2026-07-20 16:05:17 +00:00
return function() {
return callback(...arguments);
};
2026-07-23 10:11:24 +00:00
})(), items);
2026-07-20 16:05:17 +00:00
};