decord/source/modules/app_database/system/StartupData.native.tsx

41 lines
1.1 KiB
TypeScript
Raw Normal View History

// Module ID: 2004
// Function ID: 2005
// Name: StartupData
// Dependencies: [17, 1115, 2005, 2]
2026-07-20 16:05:17 +00:00
// Exports: getUserId, setUserId
// Module 2004 (StartupData)
import _mod17 from "module_17" /* 17 */;
import PlatformUtils from "PlatformUtils" /* 1115 */;
import NativeAppDatabaseModuleDefault from "NativeAppDatabaseModule" /* 2005 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const NativeModules = _mod17.NativeModules;
const result = size.fileFinishedImporting("modules/app_database/system/StartupData.native.tsx");
2026-07-20 16:05:17 +00:00
export const getUserId = function getUserId() {
if (obj.isAndroid()) {
const userId = NativeAppDatabaseModuleDefault.getConstants().userId;
2026-07-29 08:29:29 +00:00
let tmp6 = null;
if (null != userId) {
tmp6 = userId;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp6;
2026-07-20 16:05:17 +00:00
} else {
let userId1 = NativeModules.DCDAppDatabase.userId;
if (userId1 == null) {
userId1 = null;
2026-07-20 16:05:17 +00:00
}
return userId1;
2026-07-20 16:05:17 +00:00
}
obj = PlatformUtils;
2026-07-20 16:05:17 +00:00
};
export const setUserId = function setUserId(id) {
if (obj.isAndroid()) {
NativeAppDatabaseModuleDefault.setUserId(id);
2026-07-20 16:05:17 +00:00
} else {
const DCDAppDatabase = NativeModules.DCDAppDatabase;
DCDAppDatabase.setUserId(id);
}
};