Showing
1 changed file
with
11 additions
and
0 deletions
| @@ -828,6 +828,7 @@ class HealthRawDataCoreService { | @@ -828,6 +828,7 @@ class HealthRawDataCoreService { | ||
| 828 | ) { | 828 | ) { |
| 829 | return <String, Object?>{ | 829 | return <String, Object?>{ |
| 830 | 'type': notification.recordType.name, | 830 | 'type': notification.recordType.name, |
| 831 | + 'data_type': _localNotificationDataType(notification.recordType), | ||
| 831 | 'record_time': notification.recordTime, | 832 | 'record_time': notification.recordTime, |
| 832 | 'title': notification.title, | 833 | 'title': notification.title, |
| 833 | 'content': notification.content, | 834 | 'content': notification.content, |
| @@ -836,6 +837,16 @@ class HealthRawDataCoreService { | @@ -836,6 +837,16 @@ class HealthRawDataCoreService { | ||
| 836 | }; | 837 | }; |
| 837 | } | 838 | } |
| 838 | 839 | ||
| 840 | + int _localNotificationDataType( | ||
| 841 | + HealthRawLocalNotificationRecordType recordType, | ||
| 842 | + ) { | ||
| 843 | + return switch (recordType) { | ||
| 844 | + HealthRawLocalNotificationRecordType.realtimeStress => 0, | ||
| 845 | + HealthRawLocalNotificationRecordType.hrv => 1, | ||
| 846 | + HealthRawLocalNotificationRecordType.sleep => 2, | ||
| 847 | + }; | ||
| 848 | + } | ||
| 849 | + | ||
| 839 | Map<String, Object?> _localNotificationRecordPayload( | 850 | Map<String, Object?> _localNotificationRecordPayload( |
| 840 | HealthRawLocalNotificationRecord record, | 851 | HealthRawLocalNotificationRecord record, |
| 841 | ) { | 852 | ) { |
-
Please register or login to post a comment