161 lines
4.8 KiB
TypeScript
161 lines
4.8 KiB
TypeScript
// Module ID: 14499
|
|
// Function ID: 14500
|
|
// Name: _updateBadgeSettings
|
|
// Dependencies: [5, 673, 527, 706, 1205, 2]
|
|
// Exports: updateBadgeSettings
|
|
|
|
// Module 14499 (_updateBadgeSettings)
|
|
import closure_3 from "asyncGeneratorStep" /* 5 */;
|
|
import { Endpoints } from "ME" /* 673 */;
|
|
|
|
const require = arg1;
|
|
function _updateBadgeSettings() {
|
|
const self = this;
|
|
const tmp = callback((arg0) => {
|
|
closure_0 = arg0;
|
|
c5 = 0;
|
|
c6 = 0;
|
|
c4 = 0;
|
|
const iter = (function*(arg0) {
|
|
if (c6 === 2) {
|
|
c6 = 3;
|
|
HermesBuiltin.throwTypeError();
|
|
} else if (tmp6 === 3) {
|
|
if (arg0 === 1) {
|
|
throw arg1;
|
|
} else if (arg0 === 2) {
|
|
let obj = { value: null, done: true };
|
|
obj[0] = arg1;
|
|
return obj;
|
|
} else {
|
|
return { value: "HermesInternal", done: null };
|
|
}
|
|
} else {
|
|
try {
|
|
c6 = 2;
|
|
if (0 === c5) {
|
|
if (arg0 === 1) {
|
|
c6 = 3;
|
|
throw arg1;
|
|
} else if (arg0 === 2) {
|
|
c6 = 3;
|
|
obj = { value: null, done: true };
|
|
obj[0] = arg1;
|
|
return obj;
|
|
} else {
|
|
let obj4 = tmp3;
|
|
let callback2 = tmp7;
|
|
let callback;
|
|
callback2 = undefined;
|
|
({ displayOrder: c0, hiddenBadges: c1 } = callback);
|
|
obj4 = undefined;
|
|
let body;
|
|
c5 = 1;
|
|
c6 = 1;
|
|
return { value: "PX_16", done: true };
|
|
}
|
|
} else if (1 === tmp7) {
|
|
if (arg0 === 1) {
|
|
c6 = 3;
|
|
throw arg1;
|
|
} else if (arg0 === 2) {
|
|
c6 = 3;
|
|
obj1 = { value: null, done: true };
|
|
obj1[0] = arg1;
|
|
return obj1;
|
|
} else {
|
|
if (null != callback) {
|
|
const obj2 = { display_order: null };
|
|
obj2[0] = callback;
|
|
let obj3 = obj2;
|
|
} else {
|
|
obj3 = {};
|
|
}
|
|
obj4 = {};
|
|
const merged = Object.assign(obj3);
|
|
if (null != callback2) {
|
|
const obj5 = { hidden_badges: null };
|
|
obj5[0] = callback2;
|
|
let obj6 = obj5;
|
|
} else {
|
|
obj6 = {};
|
|
}
|
|
const merged1 = Object.assign(obj6);
|
|
const _Object = Object;
|
|
if (0 === Object.keys(obj4).length) {
|
|
c6 = 3;
|
|
return { value: true, done: true };
|
|
} else {
|
|
let constants = 1;
|
|
const HTTP = callback(obj4[2]).HTTP;
|
|
const obj7 = { url: null, body: null, rejectWithError: true };
|
|
obj7[0] = constants.USER_BADGE_SETTINGS;
|
|
obj7[1] = obj4;
|
|
c5 = 3;
|
|
c6 = 1;
|
|
const obj8 = { value: null, done: false };
|
|
obj8[0] = HTTP.patch(obj7);
|
|
return obj8;
|
|
}
|
|
}
|
|
} else if (2 === tmp7) {
|
|
constants = 0;
|
|
constants = body;
|
|
obj3 = callback2(obj4[4]);
|
|
obj3.captureException(constants);
|
|
c6 = 3;
|
|
return { value: false, done: true };
|
|
} else if (arg0 === 1) {
|
|
c6 = 3;
|
|
throw arg1;
|
|
} else if (arg0 === 2) {
|
|
constants = 0;
|
|
c6 = 3;
|
|
const obj9 = { value: null, done: true };
|
|
obj9[0] = arg1;
|
|
return obj9;
|
|
} else {
|
|
body = arg1;
|
|
obj = callback2(obj4[3]);
|
|
const obj10 = { type: "BADGE_SETTINGS_UPDATE", settings: null };
|
|
obj10[1] = body.body;
|
|
obj.dispatch(obj10);
|
|
constants = 0;
|
|
c6 = 3;
|
|
return { value: true, done: true };
|
|
}
|
|
} catch (tmp43) {
|
|
body = tmp43;
|
|
if (tmp4 === constants) {
|
|
c6 = tmp2;
|
|
throw tmp43;
|
|
} else {
|
|
c5 = tmp;
|
|
}
|
|
}
|
|
}
|
|
})();
|
|
iter.next();
|
|
return iter;
|
|
});
|
|
closure_5 = tmp;
|
|
const apply = tmp.apply;
|
|
if (typeof apply === "unknown") {
|
|
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
|
|
} else {
|
|
applyArgumentsResult = apply(self, arguments);
|
|
}
|
|
return applyArgumentsResult;
|
|
}
|
|
const result = require("set").fileFinishedImporting("modules/badges/BadgeSettingsActionCreators.tsx");
|
|
|
|
export const updateBadgeSettings = function updateBadgeSettings(arg0) {
|
|
const self = this;
|
|
const apply = _updateBadgeSettings.apply;
|
|
if (typeof apply === "unknown") {
|
|
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
|
|
} else {
|
|
applyArgumentsResult = apply(self, arguments);
|
|
}
|
|
return applyArgumentsResult;
|
|
};
|