Uh oh!
There was an error while loading. Please reload this page.
Fix comment about adding packages in android template - #41856
Fix comment about adding packages in android template#41856janicduplessis wants to merge 6 commits into
Conversation
facebook-github-bot
commented
Dec 8, 2023
@dmytrorykun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Uh oh!
There was an error while loading. Please reload this page.
Base commit: 1727ffa |
…elloworld/MainApplication.kt Co-authored-by: Nicola Corti <corti.nico@gmail.com>
janicduplessis
commented
Dec 8, 2023
@cortinico Good idea, I tested that the code works |
cortinico
commented
Dec 12, 2023
@janicduplessis can we make it a bit nicer as: overridefungetPackages(): List<ReactPackage> =PackageList(this).packages.apply {
// Packages that cannot be autolinked yet can be added manually here, for example:// add(MyReactNativePackage())
} |
janicduplessis
commented
Dec 12, 2023
@cortinico There you go! |
Uh oh!
There was an error while loading. Please reload this page.
…elloworld/MainApplication.kt Co-authored-by: Nicola Corti <corti.nico@gmail.com>
facebook-github-bot
commented
Dec 27, 2023
@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
facebook-github-bot
commented
Dec 27, 2023
@cortinico merged this pull request in ac9b87c. |
Summary: I noticed this comment is still in Java in the Kotlin template. It also doesn't really work anymore since there is no packages variable. To fix it I completed the comment with all code needed for it to work in kotlin. I think an older version of the template used to be more like: ```kotlin val packages = PackageList(this).packages // packages.add(MyReactNativePackage()) return packages ``` But then it requires adding a lint suppress annotation since packages variable can be simplified. I think this is simpler even if it makes the comment a few more lines. ## Changelog: [GENERAL] [FIXED] - Fix comment about adding packages in android template Pull Request resolved: #41856 Test Plan: Tested that uncommenting that code works Reviewed By: cipolleschi Differential Revision: D51987483 Pulled By: cortinico fbshipit-source-id: d0135b5b536960017ccc7b25f92c75b3bd863cd9
| @@ -15,11 +15,11 @@ class MainApplication : Application(), ReactApplication { | |||
| override val reactNativeHost: ReactNativeHost = | |||
| object : DefaultReactNativeHost(this) { | |||
There was a problem hiding this comment.
The mix usages of 4 space tab and 2 space tab bothering me a lot 😞
Can I make PR? ( asking cause this doesn't resolve or implement anything )
There was a problem hiding this comment.
This is autoformatted by ktfmt, so even if you send a PR that attempts to fix this, it will be reformatted back to how it is now
Summary: I noticed this comment is still in Java in the Kotlin template. It also doesn't really work anymore since there is no packages variable. To fix it I completed the comment with all code needed for it to work in kotlin. I think an older version of the template used to be more like: ```kotlin val packages = PackageList(this).packages // packages.add(MyReactNativePackage()) return packages ``` But then it requires adding a lint suppress annotation since packages variable can be simplified. I think this is simpler even if it makes the comment a few more lines. ## Changelog: [GENERAL] [FIXED] - Fix comment about adding packages in android template Pull Request resolved: react/react-native#41856 Test Plan: Tested that uncommenting that code works Reviewed By: cipolleschi Differential Revision: D51987483 Pulled By: cortinico fbshipit-source-id: d0135b5b536960017ccc7b25f92c75b3bd863cd9 Original: react/react-native@ac9b87c
Summary: I noticed this comment is still in Java in the Kotlin template. It also doesn't really work anymore since there is no packages variable. To fix it I completed the comment with all code needed for it to work in kotlin. I think an older version of the template used to be more like: ```kotlin val packages = PackageList(this).packages // packages.add(MyReactNativePackage()) return packages ``` But then it requires adding a lint suppress annotation since packages variable can be simplified. I think this is simpler even if it makes the comment a few more lines. ## Changelog: [GENERAL] [FIXED] - Fix comment about adding packages in android template Pull Request resolved: react/react-native#41856 Test Plan: Tested that uncommenting that code works Reviewed By: cipolleschi Differential Revision: D51987483 Pulled By: cortinico fbshipit-source-id: d0135b5b536960017ccc7b25f92c75b3bd863cd9 Original-Commit: react/react-native@ac9b87c
Summary: I noticed this comment is still in Java in the Kotlin template. It also doesn't really work anymore since there is no packages variable. To fix it I completed the comment with all code needed for it to work in kotlin. I think an older version of the template used to be more like: ```kotlin val packages = PackageList(this).packages // packages.add(MyReactNativePackage()) return packages ``` But then it requires adding a lint suppress annotation since packages variable can be simplified. I think this is simpler even if it makes the comment a few more lines. ## Changelog: [GENERAL] [FIXED] - Fix comment about adding packages in android template Pull Request resolved: react/react-native#41856 Test Plan: Tested that uncommenting that code works Reviewed By: cipolleschi Differential Revision: D51987483 Pulled By: cortinico fbshipit-source-id: d0135b5b536960017ccc7b25f92c75b3bd863cd9 Original-Commit: react/react-native@ac9b87c
Summary:
I noticed this comment is still in Java in the Kotlin template. It also doesn't really work anymore since there is no packages variable.
To fix it I completed the comment with all code needed for it to work in kotlin. I think an older version of the template used to be more like:
But then it requires adding a lint suppress annotation since packages variable can be simplified. I think this is simpler even if it makes the comment a few more lines.
Changelog:
[GENERAL] [FIXED] - Fix comment about adding packages in android template
Test Plan:
Tested that uncommenting that code works