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

This commit is contained in:
Bettenbuk Zoltan 2018-05-23 17:10:50 +02:00 committed by Saúl Ibarra Corretgé
parent 7186a9c79c
commit 5c7b7cd625
2 changed files with 8 additions and 1 deletions

View File

@ -563,6 +563,7 @@
"next": "Upcoming",
"nextMeeting": "next meeting",
"now": "Now",
"ongoingMeeting": "ongoing meeting",
"permissionButton": "Open settings",
"permissionMessage": "Calendar permission is required to list your meetings in the app."
},

View File

@ -110,6 +110,12 @@ class ConferenceNotification extends Component<Props, State> {
const { t } = this.props;
if (event) {
const now = Date.now();
const label
= event.startDate < now && event.endDate > now
? 'calendarSync.ongoingMeeting'
: 'calendarSync.nextMeeting';
return (
<View
style = { [
@ -126,7 +132,7 @@ class ConferenceNotification extends Component<Props, State> {
styles.notificationTextContainer
}>
<Text style = { styles.notificationText }>
{ t('calendarSync.nextMeeting') }
{ t(label) }
</Text>
<Text style = { styles.notificationText }>
{