[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",
|
"next": "Upcoming",
|
||||||
"nextMeeting": "next meeting",
|
"nextMeeting": "next meeting",
|
||||||
"now": "Now",
|
"now": "Now",
|
||||||
|
"ongoingMeeting": "ongoing meeting",
|
||||||
"permissionButton": "Open settings",
|
"permissionButton": "Open settings",
|
||||||
"permissionMessage": "Calendar permission is required to list your meetings in the app."
|
"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;
|
const { t } = this.props;
|
||||||
|
|
||||||
if (event) {
|
if (event) {
|
||||||
|
const now = Date.now();
|
||||||
|
const label
|
||||||
|
= event.startDate < now && event.endDate > now
|
||||||
|
? 'calendarSync.ongoingMeeting'
|
||||||
|
: 'calendarSync.nextMeeting';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
style = { [
|
style = { [
|
||||||
|
@ -126,7 +132,7 @@ class ConferenceNotification extends Component<Props, State> {
|
||||||
styles.notificationTextContainer
|
styles.notificationTextContainer
|
||||||
}>
|
}>
|
||||||
<Text style = { styles.notificationText }>
|
<Text style = { styles.notificationText }>
|
||||||
{ t('calendarSync.nextMeeting') }
|
{ t(label) }
|
||||||
</Text>
|
</Text>
|
||||||
<Text style = { styles.notificationText }>
|
<Text style = { styles.notificationText }>
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue