Skip to content

Commit

Permalink
Fix unintended animation
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Dec 17, 2024
1 parent b279ba9 commit 1e88134
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/ProgressGuide/FollowDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ function DialogInner({
Map<string, AppBskyActorDefs.ProfileView[]>
>(() => new Map())

const query = searchText || selectedInterest
const {
data: searchResults,
isFetching,
Expand All @@ -147,7 +148,7 @@ function DialogInner({
isFetchingNextPage,
fetchNextPage,
} = useActorSearchPaginated({
query: searchText || selectedInterest,
query,
})

const hasSearchText = !!searchText
Expand Down Expand Up @@ -181,7 +182,8 @@ function DialogInner({
seen.add(profile.did)
_items.push({
type: 'profile',
key: profile.did,
// Don't share identity across tabs or typing attempts
key: query + ':' + profile.did,
profile,
isSuggestion: false,
})
Expand Down Expand Up @@ -234,6 +236,7 @@ function DialogInner({
hasSearchText,
selectedInterest,
suggestedAccounts,
query,
])

if (searchText && !isFetching && !items.length && !isError) {
Expand All @@ -246,7 +249,6 @@ function DialogInner({
case 'profile': {
return (
<FollowProfileCard
key={item.key}
profile={item.profile}
isSuggestion={item.isSuggestion}
moderationOpts={moderationOpts!}
Expand Down

0 comments on commit 1e88134

Please sign in to comment.