Selaa lähdekoodia

[RN] Add ongoing label to calendar notifications for past meetings

j8
Bettenbuk Zoltan 7 vuotta sitten
vanhempi
commit
5c7b7cd625

+ 1
- 0
lang/main.json Näytä tiedosto

563
         "next": "Upcoming",
563
         "next": "Upcoming",
564
         "nextMeeting": "next meeting",
564
         "nextMeeting": "next meeting",
565
         "now": "Now",
565
         "now": "Now",
566
+        "ongoingMeeting": "ongoing meeting",
566
         "permissionButton": "Open settings",
567
         "permissionButton": "Open settings",
567
         "permissionMessage": "Calendar permission is required to list your meetings in the app."
568
         "permissionMessage": "Calendar permission is required to list your meetings in the app."
568
     },
569
     },

+ 7
- 1
react/features/calendar-sync/components/ConferenceNotification.native.js Näytä tiedosto

110
         const { t } = this.props;
110
         const { t } = this.props;
111
 
111
 
112
         if (event) {
112
         if (event) {
113
+            const now = Date.now();
114
+            const label
115
+                = event.startDate < now && event.endDate > now
116
+                    ? 'calendarSync.ongoingMeeting'
117
+                    : 'calendarSync.nextMeeting';
118
+
113
             return (
119
             return (
114
                 <View
120
                 <View
115
                     style = { [
121
                     style = { [
126
                                         styles.notificationTextContainer
132
                                         styles.notificationTextContainer
127
                                     }>
133
                                     }>
128
                                     <Text style = { styles.notificationText }>
134
                                     <Text style = { styles.notificationText }>
129
-                                        { t('calendarSync.nextMeeting') }
135
+                                        { t(label) }
130
                                     </Text>
136
                                     </Text>
131
                                     <Text style = { styles.notificationText }>
137
                                     <Text style = { styles.notificationText }>
132
                                         {
138
                                         {

Loading…
Peruuta
Tallenna