mirror of
				https://gitcode.com/gh_mirrors/re/react-native-pushy.git
				synced 2025-11-04 15:23:11 +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() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user