Files
discord-decomp/modules/dm_settings_upsell/DmSettingsUpsellActionCreators.native.tsx
T
2026-11-01 12:12:55 +02:00

21 lines
920 B
TypeScript

// Metro module 16160 (f16161).
import { DM_SETTINGS_UPSELL_LAST_SHOWN_KEY, DM_SETTINGS_UPSELL_LAST_SHOWN_MAX_TIME_MS } from "./DmSettingsUpsellConstants";
import { Storage } from "../../_bundle/Module595";
import ActionSheetActionCreators from "../action_sheet/native/ActionSheetActionCreators";
import { trackEvent, DmUpsellActionTypes } from "./DmSettingsUpsellUtils";
const r17 = {
openDmSettingsUpsellModal: (a0) => {
const r14 = Storage.get(DM_SETTINGS_UPSELL_LAST_SHOWN_KEY);
const r17 = Date.now();
if (r14 != null && !(r17 - r14 > DM_SETTINGS_UPSELL_LAST_SHOWN_MAX_TIME_MS)) {
trackEvent(DmUpsellActionTypes.SUPPRESSED_BY_COOLDOWN, a0);
} else {
ActionSheetActionCreators.openLazy(import("./native/DmSettingsUpsellActionSheet"), "dm_settings_upsell_modal", {
guildId: a0
});
Storage.set(DM_SETTINGS_UPSELL_LAST_SHOWN_KEY, r17);
}
}
};
export default r17;