Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3355760
D12210.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D12210.diff
View Options
diff --git a/native/chat/chat-thread-list-search.react.js b/native/chat/chat-thread-list-search.react.js
--- a/native/chat/chat-thread-list-search.react.js
+++ b/native/chat/chat-thread-list-search.react.js
@@ -3,11 +3,11 @@
import * as React from 'react';
import { TextInput as BaseTextInput } from 'react-native';
import Animated, {
- useSharedValue,
interpolate,
useAnimatedStyle,
withTiming,
useDerivedValue,
+ type SharedValue,
} from 'react-native-reanimated';
import type { ReactRefSetter } from 'lib/types/react-types.js';
@@ -27,6 +27,7 @@
+searchStatus: SearchStatus,
+innerSearchAutoFocus?: boolean,
+innerSearchActive?: boolean,
+ +cancelButtonExpansion: SharedValue<number>,
};
function ForwardedChatThreadListSearch(
props: Props,
@@ -40,10 +41,10 @@
searchStatus,
innerSearchActive,
innerSearchAutoFocus,
+ cancelButtonExpansion,
} = props;
const styles = useStyles(unboundStyles);
- const cancelButtonExpansion = useSharedValue(0);
const isActiveOrActivating =
searchStatus === 'active' || searchStatus === 'activating';
React.useEffect(() => {
diff --git a/native/chat/chat-thread-list.react.js b/native/chat/chat-thread-list.react.js
--- a/native/chat/chat-thread-list.react.js
+++ b/native/chat/chat-thread-list.react.js
@@ -20,6 +20,7 @@
View,
} from 'react-native';
import { FloatingAction } from 'react-native-floating-action';
+import { useSharedValue } from 'react-native-reanimated';
import { useLoggedInUserInfo } from 'lib/hooks/account-hooks.js';
import { useThreadListSearch } from 'lib/hooks/thread-search-hooks.js';
@@ -213,6 +214,7 @@
return true;
}, [navigation, onSearchCancel, searchStatus]);
+ const cancelButtonExpansion = useSharedValue(0);
const searchItem = React.useMemo(
() => (
<TouchableWithoutFeedback onPress={onSearchFocus}>
@@ -224,6 +226,7 @@
searchStatus={searchStatus}
onSearchCancel={onSearchCancel}
innerSearchActive={false}
+ cancelButtonExpansion={cancelButtonExpansion}
ref={searchInputRef}
/>
</View>
@@ -237,6 +240,7 @@
searchStatus,
searchText,
styles.searchContainer,
+ cancelButtonExpansion,
],
);
@@ -340,6 +344,7 @@
searchStatus={searchStatus}
onSearchCancel={onSearchCancel}
innerSearchAutoFocus={true}
+ cancelButtonExpansion={cancelButtonExpansion}
ref={searchInputRef}
/>
</View>
@@ -351,6 +356,7 @@
searchStatus,
searchText,
styles.searchContainer,
+ cancelButtonExpansion,
]);
const scrollEnabled =
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 3:23 PM (21 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2576555
Default Alt Text
D12210.diff (2 KB)
Attached To
Mode
D12210: [native] Lift cancelButtonExpansion to ChatThreadList
Attached
Detach File
Event Timeline
Log In to Comment