Skip to content

Commit

Permalink
Merged PR 30076: Meld dat het maken van screenshot is geblokeerd
Browse files Browse the repository at this point in the history
Announce making screenshot is blocked

Related work items: #121586
  • Loading branch information
RikSchefferAmsterdam committed Jul 23, 2024
2 parents 41f4b27 + 5a59b08 commit e59d6c1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/modules/city-pass/components/CityPasses.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {useEffect} from 'react'
import {useCallback, useEffect} from 'react'
import {AccessibilityInfo, Alert} from 'react-native'
import Orientation from 'react-native-orientation-locker'
import {Overlay} from '@/components/ui/containers/Overlay'
import {useDispatch} from '@/hooks/redux/useDispatch'
Expand Down Expand Up @@ -26,8 +27,18 @@ export const CityPasses = () => {
}
}, [isCityPassesVisible])

const onScreenshot = useCallback(() => {
const screenshotMessage = 'Deze app staat geen screenshots toe'

Alert.alert(screenshotMessage)
AccessibilityInfo.announceForAccessibilityWithOptions(screenshotMessage, {
queue: true,
})
}, [])

useBlockScreenshots({
enabled: isCityPassesVisible,
onScreenshot,
})

useBrightScreen({
Expand Down

0 comments on commit e59d6c1

Please sign in to comment.