diff options
author | Eric Bailey <git@esb.lol> | 2024-09-12 13:45:06 -0500 |
---|---|---|
committer | Eric Bailey <git@esb.lol> | 2024-09-12 13:45:06 -0500 |
commit | bd79ce7ea00602db5914e54f8191b9429c024777 (patch) | |
tree | 085b008ad551c160e6734eb900b8d76c4772b918 /src/components/dialogs | |
parent | 46402fd01074764d49c1cc52b25ecf6dc5b274b2 (diff) | |
download | voidsky-bd79ce7ea00602db5914e54f8191b9429c024777.tar.zst |
Ensure dialog shows for all accounts without snoozing
Diffstat (limited to 'src/components/dialogs')
-rw-r--r-- | src/components/dialogs/nuxs/index.tsx | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/components/dialogs/nuxs/index.tsx b/src/components/dialogs/nuxs/index.tsx index a0063ce76..ba693329f 100644 --- a/src/components/dialogs/nuxs/index.tsx +++ b/src/components/dialogs/nuxs/index.tsx @@ -20,12 +20,18 @@ type Context = { const queuedNuxs: { id: Nux enabled(props: {gate: ReturnType<typeof useGate>}): boolean + /** + * TEMP only intended for use with the 10Milly dialog rn, since there are no + * other NUX dialogs configured + */ + unsafe_disableSnooze: boolean }[] = [ { id: Nux.TenMillionDialog, enabled({gate}) { return gate('ten_million_dialog') }, + unsafe_disableSnooze: true, }, ] @@ -76,18 +82,27 @@ function Inner() { if (snoozed) return if (!nuxs) return - for (const {id, enabled} of queuedNuxs) { + for (const {id, enabled, unsafe_disableSnooze} of queuedNuxs) { const nux = nuxs.find(nux => nux.id === id) // check if completed first if (nux && nux.completed) continue + // then check gate (track exposure) if (!enabled({gate})) continue // we have a winner setActiveNux(id) - // immediately snooze (in memory) - snoozeNuxDialog() + + /** + * TEMP only intended for use with the 10Milly dialog rn, since there are no + * other NUX dialogs configured + */ + if (!unsafe_disableSnooze) { + // immediately snooze (in memory) + snoozeNuxDialog() + } + // immediately update remote data (affects next reload) upsertNux({ id, |