leon 1 год назад
Родитель
Сommit
87584da3e6

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
android/app/src/main/assets/index.android.bundle


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
android/app/src/main/assets/index.android.map


+ 1 - 1
ios/AppDelegate.mm

@@ -250,7 +250,7 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
 - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
 - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
 {
 {
   //  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
   //  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
-#if DEBUG
+#if DEBUGaa
   return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
   return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
 #else
 #else
   return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
   return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];

+ 4 - 7
ios/NativeBridge.m

@@ -181,7 +181,6 @@ RCT_EXPORT_METHOD(addSunPush:(id)array){
   //identifiers规则 https://shimo.im/docs/VMAPLmQ7xVcWmeAg
   //identifiers规则 https://shimo.im/docs/VMAPLmQ7xVcWmeAg
   [center removePendingNotificationRequestsWithIdentifiers:ids];
   [center removePendingNotificationRequestsWithIdentifiers:ids];
   
   
-  NSMutableArray *list = [NSMutableArray new];
   NSUInteger count = [array count];
   NSUInteger count = [array count];
   if (count>30){
   if (count>30){
     count = 30;
     count = 30;
@@ -201,20 +200,18 @@ RCT_EXPORT_METHOD(addSunPush:(id)array){
     content.title = detail[@"title"];
     content.title = detail[@"title"];
     content.body = detail[@"body"];
     content.body = detail[@"body"];
     content.sound = [UNNotificationSound defaultSound];
     content.sound = [UNNotificationSound defaultSound];
-    content.badge = @([UIApplication sharedApplication].applicationIconBadgeNumber + 1);
+    content.badge = @(1);//@([UIApplication sharedApplication].applicationIconBadgeNumber + 1);
     
     
     
     
-    UNNotificationCategory *categroy = [UNNotificationCategory categoryWithIdentifier:[NSString stringWithFormat:@"%@",detail[@"timestamp"]] actions:@[] intentIdentifiers:@[] options:UNNotificationCategoryOptionCustomDismissAction];
-    [list addObject:categroy];
-    //      [[UNUserNotificationCenter currentNotificationCenter] setNotificationCategories:[NSSet setWithObject:categroy]];
-    content.categoryIdentifier = [NSString stringWithFormat:@"%@",detail[@"timestamp"]];
+//    UNNotificationCategory *categroy = [UNNotificationCategory categoryWithIdentifier:[NSString stringWithFormat:@"%@",detail[@"timestamp"]] actions:@[] intentIdentifiers:@[] options:UNNotificationCategoryOptionCustomDismissAction];
+//    [list addObject:categroy];
+//    content.categoryIdentifier = [NSString stringWithFormat:@"%@",detail[@"timestamp"]];
     
     
     UNTimeIntervalNotificationTrigger * trigger = [UNTimeIntervalNotificationTrigger triggerWithTimeInterval:timeInterval repeats:NO];
     UNTimeIntervalNotificationTrigger * trigger = [UNTimeIntervalNotificationTrigger triggerWithTimeInterval:timeInterval repeats:NO];
     UNNotificationRequest * request = [UNNotificationRequest requestWithIdentifier:[NSString stringWithFormat:@"REMINDER_SUN_%@",detail[@"timestamp"]] content:content trigger:trigger];
     UNNotificationRequest * request = [UNNotificationRequest requestWithIdentifier:[NSString stringWithFormat:@"REMINDER_SUN_%@",detail[@"timestamp"]] content:content trigger:trigger];
     [[UNUserNotificationCenter currentNotificationCenter] addNotificationRequest:request withCompletionHandler:^(NSError * _Nullable error) {
     [[UNUserNotificationCenter currentNotificationCenter] addNotificationRequest:request withCompletionHandler:^(NSError * _Nullable error) {
     }];
     }];
   }
   }
-  [[UNUserNotificationCenter currentNotificationCenter] setNotificationCategories:[NSSet setWithArray:list]];
 }
 }
 
 
 - (void)addFSNotifications:(id)array{
 - (void)addFSNotifications:(id)array{

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

@@ -544,7 +544,7 @@
 				CODE_SIGN_ENTITLEMENTS = hola/hola.entitlements;
 				CODE_SIGN_ENTITLEMENTS = hola/hola.entitlements;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 124;
+				CURRENT_PROJECT_VERSION = 126;
 				DEVELOPMENT_TEAM = GPMXAZ9G5N;
 				DEVELOPMENT_TEAM = GPMXAZ9G5N;
 				ENABLE_BITCODE = NO;
 				ENABLE_BITCODE = NO;
 				INFOPLIST_FILE = hola/Info.plist;
 				INFOPLIST_FILE = hola/Info.plist;
@@ -577,7 +577,7 @@
 				CODE_SIGN_ENTITLEMENTS = hola/hola.entitlements;
 				CODE_SIGN_ENTITLEMENTS = hola/hola.entitlements;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 124;
+				CURRENT_PROJECT_VERSION = 126;
 				DEVELOPMENT_TEAM = GPMXAZ9G5N;
 				DEVELOPMENT_TEAM = GPMXAZ9G5N;
 				INFOPLIST_FILE = hola/Info.plist;
 				INFOPLIST_FILE = hola/Info.plist;
 				LD_RUNPATH_SEARCH_PATHS = (
 				LD_RUNPATH_SEARCH_PATHS = (

+ 1 - 1
ios/hola/Info.plist

@@ -32,7 +32,7 @@
 		</dict>
 		</dict>
 	</array>
 	</array>
 	<key>CFBundleVersion</key>
 	<key>CFBundleVersion</key>
-	<string>124</string>
+	<string>126</string>
 	<key>ITSAppUsesNonExemptEncryption</key>
 	<key>ITSAppUsesNonExemptEncryption</key>
 	<false/>
 	<false/>
 	<key>LSApplicationCategoryType</key>
 	<key>LSApplicationCategoryType</key>

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
ios/main.jsbundle


+ 3 - 0
src/features/common/RecordItem.tsx

@@ -35,6 +35,9 @@ export default function Component(props: { children: React.ReactNode, onClick?:
     }
     }
 
 
     function longPress() {
     function longPress() {
+        if (global.dimissSel){
+            global.dimissSel()
+        }
         console.log(props.disableDelete)
         console.log(props.disableDelete)
         if (!props.delete || props.disableDelete) {
         if (!props.delete || props.disableDelete) {
             return;
             return;

+ 4 - 1
src/features/trackSomething/components/MetricHistory.tsx

@@ -75,7 +75,7 @@ export default function Component(props: { records: any[] }) {
 
 
     function tapItem(index, j) {
     function tapItem(index, j) {
         var data = global.selMetricItem;
         var data = global.selMetricItem;
-        if (data.type == 'basic' && data.schemas[0].unit_options.length > 0) {
+        if (data.type == 'basic' && data.schemas[0].unit_options.length > 1) {
             setSelIndex([index, j])
             setSelIndex([index, j])
         }
         }
     }
     }
@@ -151,6 +151,9 @@ export default function Component(props: { records: any[] }) {
     return <View style={{ display: 'flex', flexDirection: 'column' }} onClick={() => { setSelIndex([-1, -1]) }}>
     return <View style={{ display: 'flex', flexDirection: 'column' }} onClick={() => { setSelIndex([-1, -1]) }}>
         {
         {
             user.test_user && <Text style={{ color: '#fff', position: 'absolute', right: 50, top: 0, zIndex: 1000 }} onClick={() => {
             user.test_user && <Text style={{ color: '#fff', position: 'absolute', right: 50, top: 0, zIndex: 1000 }} onClick={() => {
+                if (global.dimissSel){
+                    global.dimissSel()
+                }
                 global.clearHistory()
                 global.clearHistory()
             }}>删除全部</Text>
             }}>删除全部</Text>
         }
         }

Некоторые файлы не были показаны из-за большого количества измененных файлов