Send locale to notification server, fixed sidebar image on long displays

This commit is contained in:
keplyx 2019-08-22 11:41:34 +02:00
parent f228ed0cee
commit a99e8da6e4
4 changed files with 8 additions and 3 deletions

View file

@ -10,7 +10,7 @@
"android",
"web"
],
"version": "0.0.10",
"version": "0.0.12",
"orientation": "portrait",
"primaryColor": "#be1522",
"icon": "./assets/android.icon.png",

View file

@ -130,8 +130,7 @@ export default class SideBar extends React.Component<Props, State> {
const styles = StyleSheet.create({
drawerCover: {
alignSelf: "stretch",
height: deviceHeight / 4,
height: deviceHeight / 5,
width: null,
position: "relative",
marginBottom: 10,

View file

@ -19,4 +19,8 @@ export default class LocaleManager {
i18n.translations = {fr, en};
i18n.locale = Localization.locale;
}
static getCurrentLocale() {
return Localization.locale;
}
}

View file

@ -3,6 +3,7 @@
import * as Permissions from 'expo-permissions';
import {Notifications} from 'expo';
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';
@ -139,6 +140,7 @@ export default class NotificationsManager {
}
let data = {
function: 'setup_machine_notification',
locale: LocaleManager.getCurrentLocale(),
token: token,
machine_id: machineID,
enabled: isEnabled