decord/source/modules/push_notifications/native/PushNotificationCacheManager.tsx

70 lines
2.4 KiB
TypeScript
Raw Normal View History

// Module ID: 17681
// Function ID: 17682
// Name: PushNotificationCacheManager
// Dependencies: [12556, 1372, 4482, 7228, 9827, 2]
2026-07-23 10:11:24 +00:00
// Module 17681 (PushNotificationCacheManager)
import PushNotificationDefault from "PushNotification" /* 9827 */;
import MultiAccountStore from "MultiAccountStore" /* 12556 */;
import UserStore from "UserStore" /* 1372 */;
import AutomaticLifecycleManager from "AutomaticLifecycleManager" /* 7228 */;
2026-07-20 16:05:17 +00:00
const prototype = function PushNotificationCacheManager() {
2026-07-29 08:29:29 +00:00
const applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
2026-08-24 06:08:38 +00:00
importDefault = applyArgumentsResult;
2026-07-29 08:29:29 +00:00
applyArgumentsResult.actions = {
POST_CONNECTION_OPEN() {
return applyArgumentsResult.handleUserUpdate();
},
CURRENT_USER_UPDATE() {
return applyArgumentsResult.handleUserUpdate();
},
LOGOUT() {
return applyArgumentsResult.handleLogout();
}
};
const items = [MultiAccountStore, () => applyArgumentsResult.syncMultiAccountUsers()];
2026-07-29 08:29:29 +00:00
const items1 = [items];
applyArgumentsResult.stores = new Map(items1);
applyArgumentsResult.handleUserUpdate = function handleUserUpdate() {
currentUser = currentUser.getCurrentUser();
if (null != currentUser) {
applyArgumentsResult(9827).setCurrentUser(currentUser.username, currentUser.id);
const obj2 = applyArgumentsResult(9827);
2026-07-29 08:29:29 +00:00
} else {
applyArgumentsResult(9827).setCurrentUser(null, null);
const obj = applyArgumentsResult(9827);
2026-07-29 08:29:29 +00:00
}
};
applyArgumentsResult.syncMultiAccountUsers = function syncMultiAccountUsers() {
let obj4;
if (validUsers.canUseMultiAccountNotifications) {
validUsers = validUsers.getValidUsers();
2026-07-29 08:29:29 +00:00
if (validUsers.length < 2) {
let obj3 = {};
2026-07-29 08:29:29 +00:00
} else {
obj4 = {};
2026-07-29 08:29:29 +00:00
const item = validUsers.forEach((id) => {
obj4[id.id] = applyArgumentsResult(4482).getUserTag(id, { identifiable: "always" });
2026-07-29 08:29:29 +00:00
});
obj3 = obj4;
2026-07-29 08:29:29 +00:00
}
} else {
obj3 = {};
2026-07-29 08:29:29 +00:00
}
obj4(9827).setMultiAccountUsers(obj3);
2026-07-29 08:29:29 +00:00
};
applyArgumentsResult.handleLogout = function handleLogout() {
const result = PushNotificationDefault.clearPushNotificationLogs();
2026-07-29 08:29:29 +00:00
applyArgumentsResult.handleUserUpdate();
};
return applyArgumentsResult;
}.prototype;
class prototype extends tmp2 {
2026-07-20 16:05:17 +00:00
}
const prototype1 = new prototype();
const size = fn(2);
let result = size.fileFinishedImporting("modules/push_notifications/native/PushNotificationCacheManager.tsx");
2026-07-20 16:05:17 +00:00
export default prototype1;