From ca484abdcfd6897f841af92a9eb48d4443c10d72 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 28 Jul 2026 10:43:04 +0300 Subject: [PATCH] avoid stale e2e proxy input state --- src/view/com/testing/TestCtrls.e2e.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/view/com/testing/TestCtrls.e2e.tsx b/src/view/com/testing/TestCtrls.e2e.tsx index 929d6ef4af..48e9581f66 100644 --- a/src/view/com/testing/TestCtrls.e2e.tsx +++ b/src/view/com/testing/TestCtrls.e2e.tsx @@ -1,4 +1,4 @@ -import {useState} from 'react' +import {useRef, useState} from 'react' import {Keyboard, LogBox, Pressable, TextInput, View} from 'react-native' import {useQueryClient} from '@tanstack/react-query' @@ -61,9 +61,9 @@ export function TestCtrls() { ) setShowLoggedOut(false) } - const [proxyHeader, setProxyHeader] = useState('') + const proxyHeader = useRef('') const configureProxy = () => { - const header = `${proxyHeader}#bsky_appview` + const header = `${proxyHeader.current}#bsky_appview` BLUESKY_PROXY_HEADER.set(header) agent.configureProxy(header as any) hasConfiguredProxy = true @@ -76,7 +76,9 @@ export function TestCtrls() { accessibilityLabel="Text input field" accessibilityHint="Enter proxy header" testID="e2eProxyHeaderInput" - onChangeText={val => setProxyHeader(val)} + onChangeText={val => { + proxyHeader.current = val + }} autoComplete="off" autoCorrect={false} autoCapitalize="none"