react-native-make icon indicating copy to clipboard operation
react-native-make copied to clipboard

import is being duplicated in the set-splash command

Open joaosouz4dev opened this issue 4 years ago • 0 comments

in MainActivity.java this import is being duplicated in the set-splash command

import org.devio.rn.splashscreen.SplashScreen;
import com.facebook.react.ReactActivity;

I think it's this code that does this, is there a way to optimize?

./src/modules/setSplashScreen/android/service.ts

<!--StartFragment-->  
applyPatch(mainActivityPath, {    
  pattern: /^(.+?)(?=import)/gs,    
  patch: 'import android.os.Bundle;\n' + 'import org.devio.rn.splashscreen.SplashScreen;\n', 
});
<!--EndFragment-->

joaosouz4dev avatar Jun 02 '21 17:06 joaosouz4dev