Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4825.js (118.4 MB)
69 lines
2.4 KiB
TypeScript
69 lines
2.4 KiB
TypeScript
// Module ID: 17722
|
|
// Function ID: 17723
|
|
// Name: PushNotificationCacheManager
|
|
// Dependencies: [12565, 1372, 4484, 7232, 9838, 2]
|
|
|
|
// Module 17722 (PushNotificationCacheManager)
|
|
import PushNotificationDefault from "PushNotification" /* 9838 */;
|
|
import MultiAccountStore from "MultiAccountStore" /* 12565 */;
|
|
import UserStore from "UserStore" /* 1372 */;
|
|
import AutomaticLifecycleManager from "AutomaticLifecycleManager" /* 7232 */;
|
|
|
|
const prototype = function PushNotificationCacheManager() {
|
|
const applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
|
|
importDefault = applyArgumentsResult;
|
|
applyArgumentsResult.actions = {
|
|
POST_CONNECTION_OPEN() {
|
|
return applyArgumentsResult.handleUserUpdate();
|
|
},
|
|
CURRENT_USER_UPDATE() {
|
|
return applyArgumentsResult.handleUserUpdate();
|
|
},
|
|
LOGOUT() {
|
|
return applyArgumentsResult.handleLogout();
|
|
}
|
|
};
|
|
const items = [MultiAccountStore, () => applyArgumentsResult.syncMultiAccountUsers()];
|
|
const items1 = [items];
|
|
applyArgumentsResult.stores = new Map(items1);
|
|
applyArgumentsResult.handleUserUpdate = function handleUserUpdate() {
|
|
currentUser = currentUser.getCurrentUser();
|
|
if (null != currentUser) {
|
|
applyArgumentsResult(9838).setCurrentUser(currentUser.username, currentUser.id);
|
|
const obj2 = applyArgumentsResult(9838);
|
|
} else {
|
|
applyArgumentsResult(9838).setCurrentUser(null, null);
|
|
const obj = applyArgumentsResult(9838);
|
|
}
|
|
};
|
|
applyArgumentsResult.syncMultiAccountUsers = function syncMultiAccountUsers() {
|
|
let obj4;
|
|
if (validUsers.canUseMultiAccountNotifications) {
|
|
validUsers = validUsers.getValidUsers();
|
|
if (validUsers.length < 2) {
|
|
let obj3 = {};
|
|
} else {
|
|
obj4 = {};
|
|
const item = validUsers.forEach((id) => {
|
|
obj4[id.id] = applyArgumentsResult(4484).getUserTag(id, { identifiable: "always" });
|
|
});
|
|
obj3 = obj4;
|
|
}
|
|
} else {
|
|
obj3 = {};
|
|
}
|
|
obj4(9838).setMultiAccountUsers(obj3);
|
|
};
|
|
applyArgumentsResult.handleLogout = function handleLogout() {
|
|
const result = PushNotificationDefault.clearPushNotificationLogs();
|
|
applyArgumentsResult.handleUserUpdate();
|
|
};
|
|
return applyArgumentsResult;
|
|
}.prototype;
|
|
class prototype extends tmp2 {
|
|
}
|
|
const prototype1 = new prototype();
|
|
const size = fn(2);
|
|
let result = size.fileFinishedImporting("modules/push_notifications/native/PushNotificationCacheManager.tsx");
|
|
|
|
export default prototype1;
|