Closed geof90 closed 8 years ago
+30 -140
I love it! Thanks for that :) Waiting for @Kureev to dbl check and I think we can merge that in!
I'm busy with refactoring patch system for Android right now. I think after that we can try to merge it in (but it'll require some additional efforts)
Isn't this something you could try merging into your branch? (would be cool if you could submit some changes so we can check as you work!)
This looks like a small improvement and since it removes ~140 lines, it could save you a bit of time.
@grabbou this wouldn't scale: https://github.com/rnpm/rnpm-plugin-link/pull/69/files#diff-9be25dfa687d08b7f584875b08c5b1feR11
We already have 3 different versions of MainActivity patch. This PR removes one of them and replace a versioning system by ternary check. That wouldn't work if tomorrow we'll have yet another breaking change in RN application structure.
Addresses https://github.com/rnpm/rnpm-plugin-link/issues/26
I completely removed the "getPrefix.js" file along with a ton of other code, because they are no longer needed, I hope you guys don't mind :p. There is now only a single "makeMainActivityPatch.js" that handles all the logic of detecting the type of
MainActivity
(whether it extendsActivity
orReactActivity
), and applying the appropriate patch.