Skip to content

Commit 6ae2d8f

Browse files
committed
fix(clients): pinning cancels a pending settled undo
1 parent cba153c commit 6ae2d8f

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎apps/mobile/src/features/home/useThreadListActions.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,8 @@ export function useThreadListActions(): {
452452
? (restoreOrderKey ?? orderKey)
453453
: undefined;
454454
ThreadUndo.invalidate("pin", scopedThreadKey(thread.environmentId, thread.id));
455+
// A pending Settled undo would re-snooze the thread this pin just woke.
456+
ThreadUndo.invalidate("settle", scopedThreadKey(thread.environmentId, thread.id));
455457
const result = await pinMutation({
456458
environmentId: thread.environmentId,
457459
input: { threadId: thread.id, ...(orderKey !== undefined ? { orderKey } : {}) },

‎apps/web/src/hooks/useThreadActions.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,8 @@ export function useThreadActions() {
650650
? (opts.orderKey ?? topOfPinnedRunOrderKey())
651651
: undefined;
652652
ThreadUndo.invalidate("pin", scopedThreadKey(target));
653+
// A pending Settled undo would re-snooze the thread this pin just woke.
654+
ThreadUndo.invalidate("settle", scopedThreadKey(target));
653655
return pinThreadMutation({
654656
environmentId: target.environmentId,
655657
input: {

0 commit comments

Comments
 (0)