2026-09-05 10:56:28 +00:00
|
|
|
// Module ID: 2004
|
|
|
|
|
// Function ID: 2005
|
2026-09-10 05:38:07 +00:00
|
|
|
// Name: StartupData
|
2026-09-05 10:56:28 +00:00
|
|
|
// Dependencies: [17, 1115, 2005, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: getUserId, setUserId
|
|
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
// 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
|
|
|
|
2026-09-10 05:38:07 +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()) {
|
2026-09-10 05:38:07 +00:00
|
|
|
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 {
|
2026-09-10 05:38:07 +00:00
|
|
|
let userId1 = NativeModules.DCDAppDatabase.userId;
|
|
|
|
|
if (userId1 == null) {
|
|
|
|
|
userId1 = null;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
return userId1;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
obj = PlatformUtils;
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|
|
|
|
|
export const setUserId = function setUserId(id) {
|
|
|
|
|
if (obj.isAndroid()) {
|
2026-09-10 05:38:07 +00:00
|
|
|
NativeAppDatabaseModuleDefault.setUserId(id);
|
2026-07-20 16:05:17 +00:00
|
|
|
} else {
|
|
|
|
|
const DCDAppDatabase = NativeModules.DCDAppDatabase;
|
|
|
|
|
DCDAppDatabase.setUserId(id);
|
|
|
|
|
}
|
|
|
|
|
};
|