forked from vergnet/application-amicale
Fixed image modal view jump by setting status bar to opaque
This commit is contained in:
parent
b27c36056c
commit
eab232c4dc
2 changed files with 36 additions and 19 deletions
15
App.js
15
App.js
|
@ -40,9 +40,6 @@ export default class App extends React.Component<Props, State> {
|
||||||
currentTheme: null,
|
currentTheme: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
onIntroDone: Function;
|
|
||||||
onUpdateTheme: Function;
|
|
||||||
|
|
||||||
navigatorRef: Object;
|
navigatorRef: Object;
|
||||||
|
|
||||||
defaultRoute: string | null;
|
defaultRoute: string | null;
|
||||||
|
@ -55,8 +52,6 @@ export default class App extends React.Component<Props, State> {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
LocaleManager.initTranslations();
|
LocaleManager.initTranslations();
|
||||||
this.onIntroDone = this.onIntroDone.bind(this);
|
|
||||||
this.onUpdateTheme = this.onUpdateTheme.bind(this);
|
|
||||||
SplashScreen.preventAutoHide();
|
SplashScreen.preventAutoHide();
|
||||||
this.navigatorRef = React.createRef();
|
this.navigatorRef = React.createRef();
|
||||||
this.defaultRoute = null;
|
this.defaultRoute = null;
|
||||||
|
@ -82,12 +77,12 @@ export default class App extends React.Component<Props, State> {
|
||||||
/**
|
/**
|
||||||
* Updates the theme
|
* Updates the theme
|
||||||
*/
|
*/
|
||||||
onUpdateTheme() {
|
onUpdateTheme = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
currentTheme: ThemeManager.getCurrentTheme()
|
currentTheme: ThemeManager.getCurrentTheme()
|
||||||
});
|
});
|
||||||
this.setupStatusBar();
|
this.setupStatusBar();
|
||||||
}
|
};
|
||||||
|
|
||||||
setupStatusBar() {
|
setupStatusBar() {
|
||||||
if (ThemeManager.getNightMode()) {
|
if (ThemeManager.getNightMode()) {
|
||||||
|
@ -95,12 +90,14 @@ export default class App extends React.Component<Props, State> {
|
||||||
} else {
|
} else {
|
||||||
StatusBar.setBarStyle('dark-content', true);
|
StatusBar.setBarStyle('dark-content', true);
|
||||||
}
|
}
|
||||||
|
StatusBar.setTranslucent(false);
|
||||||
|
StatusBar.setBackgroundColor(ThemeManager.getCurrentTheme().colors.surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback when user ends the intro. Save in preferences to avaoid showing back the introSlides
|
* Callback when user ends the intro. Save in preferences to avaoid showing back the introSlides
|
||||||
*/
|
*/
|
||||||
onIntroDone() {
|
onIntroDone = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showIntro: false,
|
showIntro: false,
|
||||||
showUpdate: false,
|
showUpdate: false,
|
||||||
|
@ -109,7 +106,7 @@ export default class App extends React.Component<Props, State> {
|
||||||
AsyncStorageManager.getInstance().savePref(AsyncStorageManager.getInstance().preferences.showIntro.key, '0');
|
AsyncStorageManager.getInstance().savePref(AsyncStorageManager.getInstance().preferences.showIntro.key, '0');
|
||||||
AsyncStorageManager.getInstance().savePref(AsyncStorageManager.getInstance().preferences.updateNumber.key, Update.number.toString());
|
AsyncStorageManager.getInstance().savePref(AsyncStorageManager.getInstance().preferences.updateNumber.key, Update.number.toString());
|
||||||
AsyncStorageManager.getInstance().savePref(AsyncStorageManager.getInstance().preferences.showAprilFoolsStart.key, '0');
|
AsyncStorageManager.getInstance().savePref(AsyncStorageManager.getInstance().preferences.showAprilFoolsStart.key, '0');
|
||||||
}
|
};
|
||||||
|
|
||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
await this.loadAssetsAsync();
|
await this.loadAssetsAsync();
|
||||||
|
|
40
app.json
40
app.json
|
@ -3,18 +3,30 @@
|
||||||
"name": "Campus",
|
"name": "Campus",
|
||||||
"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.",
|
"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",
|
"slug": "application-amicale",
|
||||||
"scheme": "campus-insat",
|
"backgroundColor": "#ffffff",
|
||||||
"privacy": "public",
|
"privacy": "public",
|
||||||
|
"version": "2.0.0",
|
||||||
"platforms": [
|
"platforms": [
|
||||||
"ios",
|
"ios",
|
||||||
"android",
|
"android"
|
||||||
"web"
|
|
||||||
],
|
],
|
||||||
"version": "2.0.0",
|
|
||||||
"orientation": "portrait",
|
"orientation": "portrait",
|
||||||
"primaryColor": "#be1522",
|
"primaryColor": "#be1522",
|
||||||
"userInterfaceStyle": "automatic",
|
|
||||||
"icon": "./assets/android.icon.png",
|
"icon": "./assets/android.icon.png",
|
||||||
|
"scheme": "campus-insat",
|
||||||
|
"facebookAutoInitEnabled": false,
|
||||||
|
"facebookAutoLogAppEventsEnabled": false,
|
||||||
|
"facebookAdvertiserIDCollectionEnabled": false,
|
||||||
|
"androidStatusBar": {
|
||||||
|
"barStyle": "light-content",
|
||||||
|
"hidden": false,
|
||||||
|
"translucent": true,
|
||||||
|
"backgroundColor": "#00000000"
|
||||||
|
},
|
||||||
|
"androidNavigationBar": {
|
||||||
|
"visible": true,
|
||||||
|
"barStyle": "light-content"
|
||||||
|
},
|
||||||
"splash": {
|
"splash": {
|
||||||
"backgroundColor": "#be1522",
|
"backgroundColor": "#be1522",
|
||||||
"resizeMode": "contain",
|
"resizeMode": "contain",
|
||||||
|
@ -28,12 +40,13 @@
|
||||||
"updates": {
|
"updates": {
|
||||||
"enabled": false
|
"enabled": false
|
||||||
},
|
},
|
||||||
"assetBundlePatterns": [
|
|
||||||
"**/*"
|
|
||||||
],
|
|
||||||
"ios": {
|
"ios": {
|
||||||
"bundleIdentifier": "fr.amicaleinsat.application",
|
"bundleIdentifier": "fr.amicaleinsat.application",
|
||||||
"icon": "./assets/ios.icon.png"
|
"icon": "./assets/ios.icon.png",
|
||||||
|
"appStoreUrl": "https://apps.apple.com/us/app/campus-amicale-insat/id1477722148?ls=1",
|
||||||
|
"usesIcloudStorage": false,
|
||||||
|
"usesAppleSignIn": false,
|
||||||
|
"accessesContactNotes": false
|
||||||
},
|
},
|
||||||
"android": {
|
"android": {
|
||||||
"package": "fr.amicaleinsat.application",
|
"package": "fr.amicaleinsat.application",
|
||||||
|
@ -43,10 +56,17 @@
|
||||||
"foregroundImage": "./assets/android.adaptive-icon.png",
|
"foregroundImage": "./assets/android.adaptive-icon.png",
|
||||||
"backgroundColor": "#be1522"
|
"backgroundColor": "#be1522"
|
||||||
},
|
},
|
||||||
|
"playStoreUrl": "https://play.google.com/store/apps/details?id=fr.amicaleinsat.application",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"VIBRATE",
|
"VIBRATE",
|
||||||
"CAMERA"
|
"CAMERA"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"userInterfaceStyle": "automatic",
|
||||||
|
"assetBundlePatterns": [
|
||||||
|
"**/*"
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue