[RN] Add ongoing label to calendar notifications for past meetings
This commit is contained in:
parent
7186a9c79c
commit
5c7b7cd625
|
@ -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."
|
||||
},
|
||||
|
|
|
@ -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 }>
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue