mirror of
				https://gitcode.com/gh_mirrors/re/react-native-pushy.git
				synced 2025-10-31 21:33:12 +08:00 
			
		
		
		
	remove blockupdate
This commit is contained in:
		| @@ -166,13 +166,6 @@ public class UpdateContext { | ||||
|         return sp.getString(key, null); | ||||
|     } | ||||
|  | ||||
|     public void setBlockUpdate(int until, String reason) { | ||||
|         SharedPreferences.Editor editor = sp.edit(); | ||||
|         editor.putInt("blockUntil", until); | ||||
|         editor.putString("blockReason", reason); | ||||
|         editor.apply(); | ||||
|     } | ||||
|  | ||||
|     public String getCurrentVersion() { | ||||
|         return sp.getString("currentVersion", null); | ||||
|     } | ||||
|   | ||||
| @@ -192,23 +192,6 @@ public class UpdateModuleImpl { | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     public static void setBlockUpdate(UpdateContext updateContext, ReadableMap options,Promise promise) { | ||||
|         try { | ||||
|             final int until = options.getInt("until"); | ||||
|             final String reason = options.getString("reason"); | ||||
|             UiThreadUtil.runOnUiThread(new Runnable() { | ||||
|                 @Override | ||||
|                 public void run() { | ||||
|                     updateContext.setBlockUpdate(until, reason); | ||||
|                 } | ||||
|             }); | ||||
|             promise.resolve(true); | ||||
|         }catch (Exception e){ | ||||
|             promise.reject("执行报错:"+e.getMessage()); | ||||
|         } | ||||
|  | ||||
|     } | ||||
|  | ||||
|     public static void setUuid(UpdateContext updateContext, String uuid, Promise promise) { | ||||
|         try { | ||||
|             UiThreadUtil.runOnUiThread(new Runnable() { | ||||
|   | ||||
| @@ -108,11 +108,6 @@ public class UpdateModule extends NativePushySpec { | ||||
|         UpdateModuleImpl.markSuccess(updateContext,promise); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public void setBlockUpdate(ReadableMap options,Promise promise) { | ||||
|         UpdateModuleImpl.setBlockUpdate(updateContext,options,promise); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public void setUuid(final String uuid, Promise promise) { | ||||
|         UpdateModuleImpl.setUuid(updateContext,uuid,promise); | ||||
|   | ||||
| @@ -239,18 +239,6 @@ public class UpdateModule extends ReactContextBaseJavaModule { | ||||
|         }); | ||||
|     } | ||||
|  | ||||
|     @ReactMethod | ||||
|     public void setBlockUpdate(ReadableMap options) { | ||||
|         final int until = options.getInt("until"); | ||||
|         final String reason = options.getString("reason"); | ||||
|         UiThreadUtil.runOnUiThread(new Runnable() { | ||||
|             @Override | ||||
|             public void run() { | ||||
|                 updateContext.setBlockUpdate(until, reason); | ||||
|             } | ||||
|         }); | ||||
|     } | ||||
|  | ||||
|     @ReactMethod | ||||
|     public void setUuid(final String uuid) { | ||||
|         UiThreadUtil.runOnUiThread(new Runnable() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 sunnylqm
					sunnylqm