mirror of
				https://gitcode.com/gh_mirrors/re/react-native-pushy.git
				synced 2025-10-31 21:33:12 +08:00 
			
		
		
		
	Remove blockUpdate method from UpdateContext and UpdateModule
This commit is contained in:
		| @@ -69,13 +69,6 @@ public class UpdateContext { | |||||||
|         return context.getString(R.string.pushy_build_time); |         return context.getString(R.string.pushy_build_time); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public Map getBlockUpdate() { |  | ||||||
|         return new HashMap<String, Object>() {{ |  | ||||||
|             put("until", sp.getInt("blockUntil", 0)); |  | ||||||
|             put("reason", sp.getString("blockReason", null)); |  | ||||||
|         }}; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     public boolean getIsUsingBundleUrl() { |     public boolean getIsUsingBundleUrl() { | ||||||
|         return isUsingBundleUrl; |         return isUsingBundleUrl; | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -45,7 +45,6 @@ public class UpdateModule extends NativePushySpec { | |||||||
|         if (rolledBackVersion != null) { |         if (rolledBackVersion != null) { | ||||||
|             updateContext.clearRollbackMark(); |             updateContext.clearRollbackMark(); | ||||||
|         } |         } | ||||||
|         constants.put("blockUpdate", updateContext.getBlockUpdate()); |  | ||||||
|         constants.put("uuid", updateContext.getKv("uuid")); |         constants.put("uuid", updateContext.getKv("uuid")); | ||||||
|         return constants; |         return constants; | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -59,7 +59,6 @@ public class UpdateModule extends ReactContextBaseJavaModule { | |||||||
|         if (rolledBackVersion != null) { |         if (rolledBackVersion != null) { | ||||||
|             updateContext.clearRollbackMark(); |             updateContext.clearRollbackMark(); | ||||||
|         } |         } | ||||||
|         constants.put("blockUpdate", updateContext.getBlockUpdate()); |  | ||||||
|         constants.put("uuid", updateContext.getKv("uuid")); |         constants.put("uuid", updateContext.getKv("uuid")); | ||||||
|         return constants; |         return constants; | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -16,7 +16,6 @@ static NSString *const paramLastVersion = @"lastVersion"; | |||||||
| static NSString *const paramCurrentVersion = @"currentVersion"; | static NSString *const paramCurrentVersion = @"currentVersion"; | ||||||
| static NSString *const paramIsFirstTime = @"isFirstTime"; | static NSString *const paramIsFirstTime = @"isFirstTime"; | ||||||
| static NSString *const paramIsFirstLoadOk = @"isFirstLoadOK"; | static NSString *const paramIsFirstLoadOk = @"isFirstLoadOK"; | ||||||
| static NSString *const keyBlockUpdate = @"REACTNATIVECN_PUSHY_BLOCKUPDATE"; |  | ||||||
| static NSString *const keyUuid = @"REACTNATIVECN_PUSHY_UUID"; | static NSString *const keyUuid = @"REACTNATIVECN_PUSHY_UUID"; | ||||||
| static NSString *const keyHashInfo = @"REACTNATIVECN_PUSHY_HASH_"; | static NSString *const keyHashInfo = @"REACTNATIVECN_PUSHY_HASH_"; | ||||||
| static NSString *const keyFirstLoadMarked = @"REACTNATIVECN_PUSHY_FIRSTLOADMARKED_KEY"; | static NSString *const keyFirstLoadMarked = @"REACTNATIVECN_PUSHY_FIRSTLOADMARKED_KEY"; | ||||||
| @@ -157,7 +156,6 @@ RCT_EXPORT_MODULE(RCTPushy); | |||||||
|     ret[@"buildTime"] = [RCTPushy buildTime]; |     ret[@"buildTime"] = [RCTPushy buildTime]; | ||||||
|     ret[@"rolledBackVersion"] = [defaults objectForKey:keyRolledBackMarked]; |     ret[@"rolledBackVersion"] = [defaults objectForKey:keyRolledBackMarked]; | ||||||
|     ret[@"isFirstTime"] = [defaults objectForKey:keyFirstLoadMarked]; |     ret[@"isFirstTime"] = [defaults objectForKey:keyFirstLoadMarked]; | ||||||
|     ret[@"blockUpdate"] = [defaults objectForKey:keyBlockUpdate]; |  | ||||||
|     ret[@"uuid"] = [defaults objectForKey:keyUuid]; |     ret[@"uuid"] = [defaults objectForKey:keyUuid]; | ||||||
|     NSDictionary *pushyInfo = [defaults dictionaryForKey:keyPushyInfo]; |     NSDictionary *pushyInfo = [defaults dictionaryForKey:keyPushyInfo]; | ||||||
|     ret[@"currentVersion"] = [pushyInfo objectForKey:paramCurrentVersion]; |     ret[@"currentVersion"] = [pushyInfo objectForKey:paramCurrentVersion]; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 sunnylqm
					sunnylqm