mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
using keepawake hook
This commit is contained in:
parent
8c01f67b5d
commit
7799064039
@ -1,5 +1,5 @@
|
|||||||
import { KeyboardAvoidingView, Modal, Platform, TextInput, View, TouchableOpacity, Text, } from 'react-native';
|
import { KeyboardAvoidingView, Modal, Platform, TextInput, View, TouchableOpacity, Text, } from 'react-native';
|
||||||
import { activateKeepAwake, deactivateKeepAwake } from 'expo-keep-awake';
|
import { useKeepAwake } from 'expo-keep-awake';
|
||||||
import { FlatList, ScrollView } from '@stream-io/flat-list-mvcp';
|
import { FlatList, ScrollView } from '@stream-io/flat-list-mvcp';
|
||||||
import { memo, useState, useRef, useEffect } from 'react';
|
import { memo, useState, useRef, useEffect } from 'react';
|
||||||
import { useConversation } from './useConversation.hook';
|
import { useConversation } from './useConversation.hook';
|
||||||
@ -39,10 +39,7 @@ export function ConversationBody() {
|
|||||||
|
|
||||||
const ref = useRef();
|
const ref = useRef();
|
||||||
|
|
||||||
useEffect(() => {
|
useKeepAwake();
|
||||||
activateKeepAwake();
|
|
||||||
return () => { deactivateKeepAwake() };
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const latch = () => {
|
const latch = () => {
|
||||||
if (!state.momentum) {
|
if (!state.momentum) {
|
||||||
|
Loading…
Reference in New Issue
Block a user