[🐴] 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
parent
4fa92d7a49
commit
6dde487563
|
@ -278,12 +278,16 @@ export function MessagesList({
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (!hasScrolled) {
|
||||||
|
setHasScrolled(true)
|
||||||
|
}
|
||||||
|
|
||||||
convoState.sendMessage({
|
convoState.sendMessage({
|
||||||
text: rt.text,
|
text: rt.text,
|
||||||
facets: rt.facets,
|
facets: rt.facets,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
[convoState, getAgent],
|
[convoState, getAgent, hasScrolled, setHasScrolled],
|
||||||
)
|
)
|
||||||
|
|
||||||
// -- List layout changes (opening emoji keyboard, etc.)
|
// -- List layout changes (opening emoji keyboard, etc.)
|
||||||
|
|
Loading…
Reference in New Issue