This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,41 @@
// Metro module 13515 (f13516).
import { NOTIF_SETTINGS, NOTIF_SETTING_MAPPING } from "./NotificationSettingsConstants";
import { knownExperimentConfigs } from "./NotificationSettingsExperiments";
export function getAssignedNotifSettingsAndMappings() {
const settings = [];
const mappings = [];
const set = new Set();
for (const item of NOTIF_SETTINGS) {
if (item.experiment != null) {
const r45 = knownExperimentConfigs[item.experiment];
if (r45.definition.name !== item.experiment) {
throw new Error(`Experiment called ${r45.definition.name} assigned to name ${item.experiment}`);
}
if (!item.variations.includes(r45.getConfig({
location: "getAssignedNotifSettingsAndMappings"
}).variation)) {
continue;
}
}
settings.push(item);
set.add(item.id);
}
loop10: for (const r87 of Object.entries(NOTIF_SETTING_MAPPING)) {
const [r91, r92] = r87;
const notifType = parseInt(r91);
for (const item2 of r92) {
if (!set.has(item2)) {
continue;
}
mappings.push({
notifType,
notifSetting: item2
});
continue loop10;
}
}
return {
settings,
mappings
};
}