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

+ 3
- 3
screens/HomeScreen.js View File

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

Loading…
Cancel
Save