mirror of
https://github.com/balzack/databag.git
synced 2025-02-11 19:19:16 +00:00
prevent sleep while in topic
This commit is contained in:
parent
9e5f1b5c6a
commit
8c01f67b5d
@ -18,6 +18,7 @@
|
||||
"axios": "^1.1.0",
|
||||
"expo": "~46.0.9",
|
||||
"expo-av": "^12.0.4",
|
||||
"expo-keep-awake": "~10.2.0",
|
||||
"expo-splash-screen": "~0.16.2",
|
||||
"expo-status-bar": "~1.4.0",
|
||||
"moment": "^2.29.4",
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { KeyboardAvoidingView, Modal, Platform, TextInput, View, TouchableOpacity, Text, } from 'react-native';
|
||||
import { activateKeepAwake, deactivateKeepAwake } from 'expo-keep-awake';
|
||||
import { FlatList, ScrollView } from '@stream-io/flat-list-mvcp';
|
||||
import { memo, useState, useRef, useEffect } from 'react';
|
||||
import { useConversation } from './useConversation.hook';
|
||||
@ -38,6 +39,11 @@ export function ConversationBody() {
|
||||
|
||||
const ref = useRef();
|
||||
|
||||
useEffect(() => {
|
||||
activateKeepAwake();
|
||||
return () => { deactivateKeepAwake() };
|
||||
}, []);
|
||||
|
||||
const latch = () => {
|
||||
if (!state.momentum) {
|
||||
actions.latch();
|
||||
|
Loading…
Reference in New Issue
Block a user