Browse Source

Improved dashboard display and translations. Fixed events ending the next day not showing

keplyx 4 years ago
parent
commit
0e6719a274
2 changed files with 5 additions and 5 deletions
  1. 2
    2
      app.json
  2. 3
    3
      screens/HomeScreen.js

+ 2
- 2
app.json View File

@@ -10,7 +10,7 @@
10 10
       "android",
11 11
       "web"
12 12
     ],
13
-    "version": "1.1.1",
13
+    "version": "1.2.0",
14 14
     "orientation": "portrait",
15 15
     "primaryColor": "#be1522",
16 16
     "icon": "./assets/android.icon.png",
@@ -36,7 +36,7 @@
36 36
     },
37 37
     "android": {
38 38
       "package": "fr.amicaleinsat.application",
39
-      "versionCode": 8,
39
+      "versionCode": 9,
40 40
       "icon": "./assets/android.icon.png",
41 41
       "adaptiveIcon": {
42 42
         "foregroundImage": "./assets/android.adaptive-icon.png",

+ 3
- 3
screens/HomeScreen.js View File

@@ -41,7 +41,7 @@ function openWebLink(link) {
41 41
 export default class HomeScreen extends FetchedDataSectionList {
42 42
 
43 43
     constructor() {
44
-        super('DATA_URL', REFRESH_TIME);
44
+        super(DATA_URL, REFRESH_TIME);
45 45
     }
46 46
 
47 47
     getHeaderTranslation() {
@@ -57,7 +57,7 @@ export default class HomeScreen extends FetchedDataSectionList {
57 57
     }
58 58
 
59 59
     createDataset(fetchedData: Object) {
60
-        fetchedData = DATA;
60
+        // fetchedData = DATA;
61 61
         let newsData = [];
62 62
         let dashboardData = [];
63 63
         if (fetchedData['news_feed'] !== undefined)
@@ -255,7 +255,7 @@ export default class HomeScreen extends FetchedDataSectionList {
255 255
                 if (startDate > now)
256 256
                     validEvents.push(event);
257 257
                 else if (endDate !== undefined && endDate !== null) {
258
-                    if (endDate > now)
258
+                    if (endDate > now || endDate < startDate) // Display event if it ends the following day
259 259
                         validEvents.push(event);
260 260
                 }
261 261
             }

Loading…
Cancel
Save