forked from vergnet/application-amicale
Send locale to notification server, fixed sidebar image on long displays
This commit is contained in:
parent
f228ed0cee
commit
a99e8da6e4
4 changed files with 8 additions and 3 deletions
2
app.json
2
app.json
|
@ -10,7 +10,7 @@
|
||||||
"android",
|
"android",
|
||||||
"web"
|
"web"
|
||||||
],
|
],
|
||||||
"version": "0.0.10",
|
"version": "0.0.12",
|
||||||
"orientation": "portrait",
|
"orientation": "portrait",
|
||||||
"primaryColor": "#be1522",
|
"primaryColor": "#be1522",
|
||||||
"icon": "./assets/android.icon.png",
|
"icon": "./assets/android.icon.png",
|
||||||
|
|
|
@ -130,8 +130,7 @@ export default class SideBar extends React.Component<Props, State> {
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
drawerCover: {
|
drawerCover: {
|
||||||
alignSelf: "stretch",
|
height: deviceHeight / 5,
|
||||||
height: deviceHeight / 4,
|
|
||||||
width: null,
|
width: null,
|
||||||
position: "relative",
|
position: "relative",
|
||||||
marginBottom: 10,
|
marginBottom: 10,
|
||||||
|
|
|
@ -19,4 +19,8 @@ export default class LocaleManager {
|
||||||
i18n.translations = {fr, en};
|
i18n.translations = {fr, en};
|
||||||
i18n.locale = Localization.locale;
|
i18n.locale = Localization.locale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static getCurrentLocale() {
|
||||||
|
return Localization.locale;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
import * as Permissions from 'expo-permissions';
|
import * as Permissions from 'expo-permissions';
|
||||||
import {Notifications} from 'expo';
|
import {Notifications} from 'expo';
|
||||||
import AsyncStorageManager from "./AsyncStorageManager";
|
import AsyncStorageManager from "./AsyncStorageManager";
|
||||||
|
import LocaleManager from "./LocaleManager";
|
||||||
|
|
||||||
const EXPO_TOKEN_SERVER = 'https://srv-falcon.etud.insa-toulouse.fr/~amicale_app/expo_notifications/save_token.php';
|
const EXPO_TOKEN_SERVER = 'https://srv-falcon.etud.insa-toulouse.fr/~amicale_app/expo_notifications/save_token.php';
|
||||||
|
|
||||||
|
@ -139,6 +140,7 @@ export default class NotificationsManager {
|
||||||
}
|
}
|
||||||
let data = {
|
let data = {
|
||||||
function: 'setup_machine_notification',
|
function: 'setup_machine_notification',
|
||||||
|
locale: LocaleManager.getCurrentLocale(),
|
||||||
token: token,
|
token: token,
|
||||||
machine_id: machineID,
|
machine_id: machineID,
|
||||||
enabled: isEnabled
|
enabled: isEnabled
|
||||||
|
|
Loading…
Reference in a new issue