Browse Source

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

keplyx 4 years ago
parent
commit
a99e8da6e4
4 changed files with 8 additions and 3 deletions
  1. 1
    1
      app.json
  2. 1
    2
      components/Sidebar.js
  3. 4
    0
      utils/LocaleManager.js
  4. 2
    0
      utils/NotificationsManager.js

+ 1
- 1
app.json View File

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

+ 1
- 2
components/Sidebar.js View File

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

+ 4
- 0
utils/LocaleManager.js View File

@@ -19,4 +19,8 @@ export default class LocaleManager {
19 19
         i18n.translations = {fr, en};
20 20
         i18n.locale = Localization.locale;
21 21
     }
22
+
23
+    static getCurrentLocale() {
24
+        return Localization.locale;
25
+    }
22 26
 }

+ 2
- 0
utils/NotificationsManager.js View File

@@ -3,6 +3,7 @@
3 3
 import * as Permissions from 'expo-permissions';
4 4
 import {Notifications} from 'expo';
5 5
 import AsyncStorageManager from "./AsyncStorageManager";
6
+import LocaleManager from "./LocaleManager";
6 7
 
7 8
 const EXPO_TOKEN_SERVER = 'https://srv-falcon.etud.insa-toulouse.fr/~amicale_app/expo_notifications/save_token.php';
8 9
 
@@ -139,6 +140,7 @@ export default class NotificationsManager {
139 140
         }
140 141
         let data = {
141 142
             function: 'setup_machine_notification',
143
+            locale: LocaleManager.getCurrentLocale(),
142 144
             token: token,
143 145
             machine_id: machineID,
144 146
             enabled: isEnabled

Loading…
Cancel
Save