(fix) enhance display of all-day invitations (fixes #4145)

Conflicts:
	SoObjects/Appointments/SOGoAptMailNotification.m
This commit is contained in:
Ludovic Marcotte committed 2017-04-12 16:36:41 -04:00
1 parent 0af81b0831
commit d87dc6cdf2
5 files changed
+40 -15

No files matched your search

@@ -18,6 +18,8 @@ vtodo_class2 = "(Confidential task)";
"calendar_label" = "Calendar";
"startDate_label" = "Start";
"endDate_label" = "End";
"time_label" = "Time";
"to_label" = "to";
"due_label" = "Due Date";
"location_label" = "Location";
"summary_label" = "Summary";
@@ -24,6 +24,8 @@
#import <Foundation/NSTimeZone.h>
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGObjWeb/WOResponse.h>
#import <NGExtensions/NSCalendarDate+misc.h>
#import <NGExtensions/NSObject+Logs.h>
#import <NGCards/iCalEvent.h>
@@ -182,6 +184,19 @@
return sentByText;
}
- (NSTimeInterval) duration
{
return [[self newEndDate] timeIntervalSinceDate:[self newStartDate]];
}
- (BOOL) isEndDateOnSameDay
{
if ([[self apt] isAllDay])
return ([self duration] <= 86400);
return [[self newStartDate] isDateOnSameDay: [self newEndDate]];
}
- (NSString *) formattedAptStartDate
{
NSString *s;
@@ -787,7 +787,7 @@
return;
// We never send IMIP inivitaton/deletion/update when the "initiator" is an EAS client.
//That is because Outlook, iOS and Android will always issue a SendMail command
// That is because Outlook, iOS and Android will always issue a SendMail command
// with the meeting details (ie., IMIP message with METHOD:REQUEST) so there's
// no need to send it twice. Moreover, Outlook users can also choose to NOT send
// the IMIP messsage at all, so SOGo won't send one without user's consent