File tree Expand file tree Collapse file tree 3 files changed +5
-10
lines changed
com.unity.mobile.notifications/Runtime/iOS Expand file tree Collapse file tree 3 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ typedef struct iOSNotificationData
49
49
int minute ;
50
50
int second ;
51
51
unsigned char repeats ;
52
- unsigned char originalUtc ;
53
52
} calendar ;
54
53
55
54
struct
Original file line number Diff line number Diff line change @@ -152,7 +152,6 @@ iOSNotificationData UNNotificationRequestToiOSNotificationData(UNNotificationReq
152
152
notificationData.trigger .calendar .minute = (int )date.minute ;
153
153
notificationData.trigger .calendar .second = (int )date.second ;
154
154
notificationData.trigger .calendar .repeats = (int )calendarTrigger.repeats ;
155
- notificationData.trigger .calendar .originalUtc = 1 ;
156
155
}
157
156
else if ([request.trigger isKindOfClass: [UNLocationNotificationTrigger class ]])
158
157
{
Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ internal struct CalendarTriggerData
49
49
public Int32 minute ;
50
50
public Int32 second ;
51
51
public Byte repeats ;
52
- public Byte originalUtc ;
53
52
}
54
53
55
54
[ StructLayout ( LayoutKind . Sequential ) ]
@@ -275,13 +274,11 @@ public iOSNotificationTrigger Trigger
275
274
case iOSNotificationTriggerType . Calendar :
276
275
{
277
276
var trigger = ( ( iOSNotificationCalendarTrigger ) value ) ;
278
- if ( trigger . UtcTime )
279
- data . trigger . calendar . originalUtc = 1 ;
280
- else
281
- {
282
- data . trigger . calendar . originalUtc = 0 ;
277
+ if ( userInfo == null )
278
+ userInfo = new Dictionary < string , string > ( ) ;
279
+ userInfo [ "OriginalUtc" ] = trigger . UtcTime ? "1" : "0" ;
280
+ if ( ! trigger . UtcTime )
283
281
trigger = trigger . ToUtc ( ) ;
284
- }
285
282
data . trigger . calendar . year = trigger . Year != null ? trigger . Year . Value : - 1 ;
286
283
data . trigger . calendar . month = trigger . Month != null ? trigger . Month . Value : - 1 ;
287
284
data . trigger . calendar . day = trigger . Day != null ? trigger . Day . Value : - 1 ;
@@ -333,7 +330,7 @@ public iOSNotificationTrigger Trigger
333
330
UtcTime = true ,
334
331
Repeats = data . trigger . calendar . repeats != 0
335
332
} ;
336
- if ( data . trigger . calendar . originalUtc == 0 )
333
+ if ( userInfo != null && userInfo [ "OriginalUtc" ] == "0" )
337
334
trigger = trigger . ToLocal ( ) ;
338
335
return trigger ;
339
336
}
You can’t perform that action at this time.
0 commit comments