[🐴] Prevent flash upon first message (#4133)

* Prevent flash upon first message

* set `hasScrolled` to true when sending a message if it isn't already true

* revert other change

* lint

---------

Co-authored-by: Hailey <me@haileyok.com>
zio/stable
Eric Bailey 2024-05-20 18:29:16 -05:00 committed by GitHub
parent 4fa92d7a49
commit 6dde487563
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -278,12 +278,16 @@ export function MessagesList({
return true
})
if (!hasScrolled) {
setHasScrolled(true)
}
convoState.sendMessage({
text: rt.text,
facets: rt.facets,
})
},
[convoState, getAgent],
[convoState, getAgent, hasScrolled, setHasScrolled],
)
// -- List layout changes (opening emoji keyboard, etc.)