Only listen to back button on android (#1623)

zio/stable
Paul Frazee 2023-10-05 18:29:41 -07:00 committed by GitHub
parent bd7db8af26
commit b74a0e0fe2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -131,6 +131,9 @@ export const ComposePost = observer(function ComposePost({
}, [store, onClose, graphemeLength, gallery])
// android back button
useEffect(() => {
if (!isAndroid) {
return
}
const backHandler = BackHandler.addEventListener(
'hardwareBackPress',
() => {