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

70 lines
2.3 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 16818
// Function ID: 16819
2026-07-29 08:29:29 +00:00
// Name: prototype
2026-08-25 06:04:03 +00:00
// Dependencies: [11977, 1922, 4224, 5367, 10861, 2]
2026-07-23 10:11:24 +00:00
2026-08-25 06:04:03 +00:00
// Module 16818 (prototype)
import initializeDefault from "initialize" /* 5367 */;
import closure_2 from "initialize" /* 11977 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "mergeGuildAvatar" /* 1922 */;
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
initializeDefault;
2026-07-29 08:29:29 +00:00
let prototype = function PushNotificationCacheManager() {
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();
}
};
2026-08-24 06:08:38 +00:00
const items = [closure_2, () => 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) {
2026-08-25 06:04:03 +00:00
applyArgumentsResult(10861).setCurrentUser(currentUser.username, currentUser.id);
const obj2 = applyArgumentsResult(10861);
2026-07-29 08:29:29 +00:00
} else {
2026-08-25 06:04:03 +00:00
applyArgumentsResult(10861).setCurrentUser(null, null);
const obj = applyArgumentsResult(10861);
2026-07-29 08:29:29 +00:00
}
};
applyArgumentsResult.syncMultiAccountUsers = function syncMultiAccountUsers() {
2026-08-25 06:04:03 +00:00
obj = obj(10861);
2026-07-29 08:29:29 +00:00
obj = undefined;
if (obj.canUseMultiAccountNotifications) {
const validUsers = obj.getValidUsers();
if (validUsers.length < 2) {
obj = {};
} else {
obj = {};
const item = validUsers.forEach((id) => {
2026-08-24 06:08:38 +00:00
obj = obj(closure_1_1[2]);
2026-07-29 08:29:29 +00:00
obj[id.id] = obj.getUserTag(id, { identifiable: "always" });
});
}
} else {
obj = {};
}
obj.setMultiAccountUsers(obj);
};
applyArgumentsResult.handleLogout = function handleLogout() {
2026-08-24 06:08:38 +00:00
const result = applyArgumentsResult(closure_1_1[4]).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
}
2026-07-29 08:29:29 +00:00
prototype = new prototype();
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("modules/push_notifications/native/PushNotificationCacheManager.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default prototype;