Video records API
This commit is contained in:
17
App.js
17
App.js
@@ -23,6 +23,7 @@ import MenuView from './Views/Menu.js';
|
||||
import ProfileSettings from './Views/ProfileSettings.js';
|
||||
import InviteView from './Views/Invite.js';
|
||||
import MediaView from './components/MediaView.js';
|
||||
import GlobalState from './contexts/GlobalState.js';
|
||||
|
||||
|
||||
const Tab = createBottomTabNavigator();
|
||||
@@ -107,9 +108,16 @@ const MainNavigation = () => {
|
||||
console.log(response);
|
||||
});
|
||||
|
||||
const interval = setInterval(async () => {
|
||||
if(await API.isLoggedIn())
|
||||
console.log("Updating me")
|
||||
GlobalState.me = await API.getMe();
|
||||
}, 10000);
|
||||
|
||||
return () => {
|
||||
Notifications.removeNotificationSubscription(notificationListener.current);
|
||||
Notifications.removeNotificationSubscription(responseListener.current);
|
||||
clearInterval(interval);
|
||||
};
|
||||
}, []);
|
||||
|
||||
@@ -232,14 +240,7 @@ export default function App() {
|
||||
{props.navigation.canGoBack() ? <Appbar.BackAction onPress={()=>{
|
||||
props.navigation.goBack();
|
||||
}} /> : <></>}
|
||||
<Appbar.Content title={
|
||||
<Button icon={({ size, color }) => (
|
||||
<Image
|
||||
source={require('./assets/icon.png')}
|
||||
style={{ width: size, height: size }}
|
||||
/>
|
||||
)} mode="text" >EMI Fellowship</Button>
|
||||
} titleStyle={{}}/>
|
||||
<Appbar.Content title="EMI Fellowship" titleStyle={{}}/>
|
||||
<Appbar.Action icon="chat" onPress={()=>{alert("Chats are comming soon.")}} />
|
||||
<Appbar.Action icon="search" onPress={()=>{props.navigation.navigate("Search")}} />
|
||||
<Appbar.Action icon="notifications" onPress={()=>{props.navigation.navigate("Notifications")}} />
|
||||
|
||||
Reference in New Issue
Block a user