Updated libs to latest compatible version

This commit is contained in:
Arnaud Vergnet 2020-04-05 23:51:15 +02:00
parent 8026f8b223
commit daae4984ad
5 changed files with 90 additions and 86 deletions

19
App.js
View file

@ -1,7 +1,7 @@
// @flow
import * as React from 'react';
import {Platform, StatusBar} from 'react-native';
import {StatusBar} from 'react-native';
import LocaleManager from './managers/LocaleManager';
import AsyncStorageManager from "./managers/AsyncStorageManager";
import CustomIntroSlider from "./components/Custom/CustomIntroSlider";
@ -60,12 +60,10 @@ export default class App extends React.Component<Props, State> {
}
setupStatusBar() {
if (Platform.OS === 'ios') {
if (ThemeManager.getNightMode()) {
StatusBar.setBarStyle('light-content', true);
} else {
StatusBar.setBarStyle('dark-content', true);
}
if (ThemeManager.getNightMode()) {
StatusBar.setBarStyle('light-content', true);
} else {
StatusBar.setBarStyle('dark-content', true);
}
}
@ -109,8 +107,11 @@ export default class App extends React.Component<Props, State> {
showUpdate: AsyncStorageManager.getInstance().preferences.updateNumber.current !== Update.number.toString(),
showAprilFools: AprilFoolsManager.getInstance().isAprilFoolsEnabled() && AsyncStorageManager.getInstance().preferences.showAprilFoolsStart.current === '1',
});
// Status bar goes dark if set too fast
setTimeout(this.setupStatusBar, 1000);
// Status bar goes dark if set too fast on ios
if (Platform.OS === 'ios')
setTimeout(this.setupStatusBar, 1000);
else
this.setupStatusBar();
SplashScreen.hide();
}

View file

@ -4,7 +4,6 @@
"description": "Application mobile compatible Android et iOS pour l'Amicale INSA Toulouse. Grâce à cette application, vous avez facilement accès aux news du campus, aux emplois du temps, à l'état de la laverie, et bien d'autres services ! Ceci est une version Beta, Toutes les fonctionnalités ne sont pas encore implémentées, et il est possible de rencontrer quelques bugs.",
"slug": "application-amicale",
"privacy": "public",
"sdkVersion": "36.0.0",
"platforms": [
"ios",
"android",

View file

@ -142,7 +142,7 @@ export default class CustomIntroSlider extends React.Component<Props> {
return (
<AppIntroSlider
renderItem={CustomIntroSlider.getIntroRenderItem}
slides={slides}
data={slides}
onDone={this.props.onDone}
bottomButton
showSkipButton

View file

@ -1,5 +1,5 @@
import * as React from 'react';
import {Avatar, Button, Card, withTheme} from 'react-native-paper';
import {Avatar, Button, Card, Text, withTheme} from 'react-native-paper';
import {View} from "react-native";
import Autolink from "react-native-autolink";
import i18n from "i18n-js";
@ -7,65 +7,69 @@ import ImageModal from 'react-native-image-modal';
const ICON_AMICALE = require('../../assets/amicale.png');
/**
* Gets the amicale INSAT logo
*
* @return {*}
*/
function getAvatar() {
return (
<Avatar.Image size={48} source={ICON_AMICALE}
style={{backgroundColor: 'transparent'}}/>
);
}
/**
* Component used to display a feed item
*
* @param props Props to pass to the component
* @return {*}
*/
function FeedItem(props) {
const {colors} = props.theme;
return (
<Card style={{margin: 10}}>
<Card.Title
title={props.title}
subtitle={props.subtitle}
left={getAvatar}
/>
{props.full_picture !== '' && props.full_picture !== undefined ?
<View style={{marginLeft: 'auto', marginRight: 'auto'}}>
<ImageModal
resizeMode="contain"
imageBackgroundColor={colors.background}
style={{
width: 250,
height: 250,
}}
source={{
uri: props.full_picture,
}}
/></View> : <View/>}
<Card.Content>
{props.message !== undefined ?
<Autolink
text={props.message}
hashtag="facebook"
style={{color: colors.text}}
/> : <View/>
}
</Card.Content>
<Card.Actions>
<Button
color={'#57aeff'}
onPress={props.onOutLinkPress}
icon={'facebook'}>
{i18n.t('homeScreen.dashboard.seeMore')}
</Button>
</Card.Actions>
</Card>
);
class FeedItem extends React.Component {
shouldComponentUpdate() {
return false;
}
/**
* Gets the amicale INSAT logo
*
* @return {*}
*/
getAvatar() {
return (
<Avatar.Image size={48} source={ICON_AMICALE}
style={{backgroundColor: 'transparent'}}/>
);
}
render() {
return (
<Card style={{margin: 10}}>
<Card.Title
title={this.props.title}
subtitle={this.props.subtitle}
left={this.getAvatar}
/>
{this.props.full_picture !== '' && this.props.full_picture !== undefined ?
<View style={{marginLeft: 'auto', marginRight: 'auto'}}>
<ImageModal
resizeMode="contain"
imageBackgroundColor={"#000"}
style={{
width: 250,
height: 250,
}}
source={{
uri: this.props.full_picture,
}}
/></View> : <View/>}
<Card.Content>
{this.props.message !== undefined ?
<Autolink
text={this.props.message}
hashtag="facebook"
component={Text}
/> : <View/>
}
</Card.Content>
<Card.Actions>
<Button
color={'#57aeff'}
onPress={this.props.onOutLinkPress}
icon={'facebook'}>
{i18n.t('homeScreen.dashboard.seeMore')}
</Button>
</Card.Actions>
</Card>
);
}
}
export default withTheme(FeedItem);

View file

@ -20,42 +20,42 @@
]
},
"dependencies": {
"@expo/vector-icons": "~10.0.0",
"@react-native-community/masked-view": "0.1.5",
"@expo/vector-icons": "^10.0.0",
"@react-native-community/masked-view": "0.1.6",
"@react-navigation/bottom-tabs": "^5.1.1",
"@react-navigation/drawer": "^5.1.1",
"@react-navigation/material-bottom-tabs": "^5.1.1",
"@react-navigation/native": "^5.0.9",
"@react-navigation/stack": "^5.1.1",
"expo": "^36.0.0",
"expo-linear-gradient": "~8.0.0",
"expo-localization": "~8.0.0",
"expo-permissions": "~8.0.0",
"expo-secure-store": "~8.0.0",
"expo-web-browser": "~8.0.0",
"expo": "^37.0.0",
"expo-linear-gradient": "~8.1.0",
"expo-localization": "~8.1.0",
"expo-permissions": "~8.1.0",
"expo-secure-store": "~8.1.0",
"expo-web-browser": "~8.1.0",
"i18n-js": "^3.3.0",
"react": "16.9.0",
"react-dom": "16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz",
"react-native-app-intro-slider": "^3.0.0",
"react-native-appearance": "~0.3.1",
"react-native-autolink": "^1.8.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-37.0.0.tar.gz",
"react-native-app-intro-slider": "^4.0.0",
"react-native-appearance": "~0.3.3",
"react-native-autolink": "^3.0.0",
"react-native-calendars": "^1.260.0",
"react-native-gesture-handler": "~1.5.0",
"react-native-gesture-handler": "~1.6.0",
"react-native-image-modal": "^1.0.1",
"react-native-modalize": "^1.3.6",
"react-native-paper": "^3.6.0",
"react-native-reanimated": "~1.4.0",
"react-native-reanimated": "~1.7.0",
"react-native-render-html": "^4.1.2",
"react-native-safe-area-context": "0.6.0",
"react-native-screens": "2.0.0-alpha.12",
"react-native-webview": "7.4.3"
"react-native-safe-area-context": "0.7.3",
"react-native-screens": "~2.2.0",
"react-native-webview": "8.1.1"
},
"devDependencies": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0",
"@babel/preset-flow": "^7.9.0",
"babel-preset-expo": "^8.0.0",
"babel-preset-expo": "^8.1.0",
"flow-bin": "^0.122.0",
"jest": "^25.1.0",
"jest-extended": "^0.11.5",