mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
MVP last read position
This commit is contained in:
@ -60,11 +60,9 @@ const AttachmentVideo: React.FC<Props> = ({
|
||||
|
||||
const appState = useRef(AppState.currentState)
|
||||
useEffect(() => {
|
||||
AppState.addEventListener('change', _handleAppStateChange)
|
||||
const appState = AppState.addEventListener('change', _handleAppStateChange)
|
||||
|
||||
return () => {
|
||||
AppState.removeEventListener('change', _handleAppStateChange)
|
||||
}
|
||||
return () => appState.remove()
|
||||
}, [])
|
||||
const _handleAppStateChange = async (nextAppState: AppStateStatus) => {
|
||||
if (appState.current.match(/active/) && nextAppState.match(/inactive/)) {
|
||||
|
Reference in New Issue
Block a user