decord/source/modules/push_notifications/native/PushNotificationCacheManager.tsx
2026-08-13 07:00:46 +00:00

68 lines
2.3 KiB
TypeScript

// Module ID: 16640
// Function ID: 16641
// Name: prototype
// Dependencies: [11840, 1922, 4187, 5301, 10746, 2]
// Module 16640 (prototype)
import initialize from "initialize";
import mergeGuildAvatar from "mergeGuildAvatar";
import "initialize";
let prototype = function PushNotificationCacheManager() {
const applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
const importDefault = applyArgumentsResult;
applyArgumentsResult.actions = {
POST_CONNECTION_OPEN() {
return applyArgumentsResult.handleUserUpdate();
},
CURRENT_USER_UPDATE() {
return applyArgumentsResult.handleUserUpdate();
},
LOGOUT() {
return applyArgumentsResult.handleLogout();
}
};
const items = [initialize, () => applyArgumentsResult.syncMultiAccountUsers()];
const items1 = [items];
applyArgumentsResult.stores = new Map(items1);
applyArgumentsResult.handleUserUpdate = function handleUserUpdate() {
currentUser = currentUser.getCurrentUser();
if (null != currentUser) {
applyArgumentsResult(10746).setCurrentUser(currentUser.username, currentUser.id);
const obj2 = applyArgumentsResult(10746);
} else {
applyArgumentsResult(10746).setCurrentUser(null, null);
const obj = applyArgumentsResult(10746);
}
};
applyArgumentsResult.syncMultiAccountUsers = function syncMultiAccountUsers() {
obj = obj(10746);
obj = undefined;
if (obj.canUseMultiAccountNotifications) {
const validUsers = obj.getValidUsers();
if (validUsers.length < 2) {
obj = {};
} else {
obj = {};
const item = validUsers.forEach((id) => {
obj = obj(outer1_1[2]);
obj[id.id] = obj.getUserTag(id, { identifiable: "always" });
});
}
} else {
obj = {};
}
obj.setMultiAccountUsers(obj);
};
applyArgumentsResult.handleLogout = function handleLogout() {
const result = applyArgumentsResult(outer1_1[4]).clearPushNotificationLogs();
applyArgumentsResult.handleUserUpdate();
};
return applyArgumentsResult;
}.prototype;
class prototype extends tmp2 {
}
prototype = new prototype();
let result = require("nameFromUser").fileFinishedImporting("modules/push_notifications/native/PushNotificationCacheManager.tsx");
export default prototype;