diff --git a/App.js b/App.js index ea42128..0ae101d 100644 --- a/App.js +++ b/App.js @@ -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 { } 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 { 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(); } diff --git a/app.json b/app.json index 31a7e78..eb3fb76 100644 --- a/app.json +++ b/app.json @@ -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", diff --git a/components/Custom/CustomIntroSlider.js b/components/Custom/CustomIntroSlider.js index 3189b02..39e589e 100644 --- a/components/Custom/CustomIntroSlider.js +++ b/components/Custom/CustomIntroSlider.js @@ -142,7 +142,7 @@ export default class CustomIntroSlider extends React.Component { return ( - ); -} - /** * Component used to display a feed item - * - * @param props Props to pass to the component - * @return {*} */ -function FeedItem(props) { - const {colors} = props.theme; - return ( - - - {props.full_picture !== '' && props.full_picture !== undefined ? - - : } - - {props.message !== undefined ? - : - } - - - - - - ); +class FeedItem extends React.Component { + + shouldComponentUpdate() { + return false; + } + + + /** + * Gets the amicale INSAT logo + * + * @return {*} + */ + getAvatar() { + return ( + + ); + } + + render() { + return ( + + + {this.props.full_picture !== '' && this.props.full_picture !== undefined ? + + : } + + {this.props.message !== undefined ? + : + } + + + + + + ); + } } export default withTheme(FeedItem); diff --git a/package.json b/package.json index 22a4ef8..c6c99ab 100644 --- a/package.json +++ b/package.json @@ -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",