@@ -26,7 +26,7 @@ import {
2626 resolveThreadWorkingStartedAt ,
2727} from "@t3tools/client-runtime/state/models" ;
2828import { AuthOrchestrationOperateScope , type EnvironmentMachineKind } from "@t3tools/contracts" ;
29- import { canSnooze , resolveSnoozePresets } from "@t3tools/client-runtime/state/thread-settled" ;
29+ import { canSnooze } from "@t3tools/client-runtime/state/thread-settled" ;
3030import type { MenuAction } from "@react-native-menu/menu" ;
3131import { memo , useCallback , useMemo , useState , type ComponentProps } from "react" ;
3232import { Pressable , useWindowDimensions , View } from "react-native" ;
@@ -63,6 +63,7 @@ import {
6363 THREAD_LIST_V2_SETTLED_PAGE_COUNT ,
6464 resolveThreadListV2SnoozeGateExpiryMs ,
6565 resolveThreadListV2SnoozeMenuSelection ,
66+ resolveThreadListV2SnoozePresets ,
6667 threadHasUnseenCompletion ,
6768 resolveThreadListV2Status ,
6869 resolveThreadListV2ProviderDrivers ,
@@ -756,12 +757,10 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
756757 snoozable : canSnooze ( thread , { now : snoozeGateNow } ) ,
757758 snoozed : snoozedRow ,
758759 } ) ;
759- const snoozePresets = useMemo (
760- // oxlint-disable-next-line react/purity -- The memo recomputes on the snoozePresetMinute tick, so preset times refresh every minute.
761- ( ) => ( swipeActions . secondary === "snooze" ? resolveSnoozePresets ( new Date ( ) ) : ( [ ] as const ) ) ,
762- // oxlint-disable-next-line react/memo-dependencies -- The minute tick refreshes relative snooze times while the row remains mounted.
763- [ props . snoozePresetMinute , swipeActions . secondary ] ,
764- ) ;
760+ const snoozePresets = resolveThreadListV2SnoozePresets ( {
761+ secondary : swipeActions . secondary ,
762+ now : props . snoozePresetMinute || snoozeGateNow ,
763+ } ) ;
765764 const snoozePresetActions = useMemo < MenuAction [ ] > (
766765 ( ) => [
767766 ...snoozePresets . map ( ( preset ) => ( {
0 commit comments