Quellcode durchsuchen

fix some crash file

leon vor 1 Jahr
Ursprung
Commit
393a43fe39

+ 1 - 1
ios/hola.xcodeproj/project.pbxproj

@@ -611,7 +611,7 @@
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
 				ENABLE_TESTABILITY = YES;
 				EXCLUDED_ARCHS = "";
-				"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
+				"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
 				GCC_C_LANGUAGE_STANDARD = gnu99;
 				GCC_DYNAMIC_NO_PIC = NO;
 				GCC_NO_COMMON_BLOCKS = YES;

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
ios/main.jsbundle


+ 2 - 2
src/features/trackTimeDuration/components/CircadianDetailPopup.tsx

@@ -93,7 +93,7 @@ export default function CircadianDetailPopup(props: { record: any, schedule?: an
         }
 
         if (props.record.sleep) {
-            if (props.record.sleep.real_start_timezone.gmt) {
+            if (props.record.sleep.real_start_timezone && props.record.sleep.real_start_timezone.gmt) {
                 if (tempTZ == '') {
                     tempTZ = props.record.sleep.real_start_timezone.gmt
                 }
@@ -105,7 +105,7 @@ export default function CircadianDetailPopup(props: { record: any, schedule?: an
                 }
             }
 
-            if (props.record.sleep.real_end_timezone.gmt) {
+            if (props.record.sleep.real_end_timezone && props.record.sleep.real_end_timezone.gmt) {
                 if (tempTZ != props.record.sleep.real_end_timezone.gmt) {
                     isMulti = true
                 }

+ 6 - 1
src/features/trackTimeDuration/components/SetSchedule.rn.tsx

@@ -28,12 +28,13 @@ let useNavigation;
 
 let JPush;
 let Linking;
-let checkNotification;
+let checkNotification,uploadPermissions;
 if (process.env.TARO_ENV == 'rn') {
     useNavigation = require("@react-navigation/native").useNavigation
     Linking = require('react-native').Linking;
     JPush = require('jpush-react-native').default;
     checkNotification = require('@/utils/native_permission_check').checkNotification;
+    uploadPermissions = require('@/utils/native_permission_check').uploadPermissions;
 }
 export default function Component() {
     const isFastFirst = true;
@@ -112,9 +113,13 @@ export default function Component() {
             Jto.getNotificationAuthStatus()
             require('react-native').NativeAppEventEmitter.addListener('notificationResult', (data) => {
                 setAuthStatus(data)
+                global.notification = data
+                uploadPermissions()
             })
             require('react-native').NativeAppEventEmitter.addListener('operateNotificationResult', (data) => {
+                global.notification = data
                 navigation.popToTop()
+                uploadPermissions()
             })
         }
 

+ 3 - 3
src/features/trackTimeDuration/components/TimelineFastSleep.tsx

@@ -136,7 +136,7 @@ export default function TimelineFastSleep(props: {
                 return TimeFormatter.dateDescription(newTimestamp, true, diffTimeZone || multTimeZone)
             }
             else {
-                var real_time_zone = props.data.last_timezone.gmt
+                var real_time_zone = props.data.last_timezone?props.data.last_timezone.gmt:''
                 var newTimestamp = TimeFormatter.transferTimestamp(obj.target_start_time, real_time_zone)
                 if (diffTimeZone || multTimeZone) {
                     return TimeFormatter.getMonthAndDayByTimestamp(newTimestamp, true) + ' '
@@ -182,7 +182,7 @@ export default function TimelineFastSleep(props: {
 
 
         var timeZone = ''
-        if (props.data.sleep.real_start_timezone.gmt) {
+        if (props.data.sleep.real_start_timezone && props.data.sleep.real_start_timezone.gmt) {
             timeZone = ' ' + props.data.sleep.real_start_timezone.gmt
         }
         var strDate = multTimeZone ? timeZone : ''
@@ -208,7 +208,7 @@ export default function TimelineFastSleep(props: {
     }
     if (props.data.sleep && props.data.scenario != 'FAST') {
         var timeZone = ''
-        if (props.data.sleep.real_end_timezone.gmt) {
+        if (props.data.sleep.real_end_timezone && props.data.sleep.real_end_timezone.gmt) {
             timeZone = ' ' + props.data.sleep.real_end_timezone.gmt
         }
         var status = getStatus(false, false, props.data)

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.