mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Minor Kotlin cleanup (#49000)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49000 Just found those nits around while looking at the codebase. This clears things out and should have no runtime impact. Changelog: [Internal] [Changed] - Reviewed By: mdvacca Differential Revision: D68768384 fbshipit-source-id: bd3a30f1792a6f662d1f5b25855c89b6d43e72bb
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c93bd436a5
commit
d797b7aa4d
+2
-2
@@ -26,7 +26,7 @@ internal class TransformAnimatedNode(
|
||||
transformConfigs =
|
||||
if (transforms == null) emptyList()
|
||||
else
|
||||
List<TransformConfig>(transforms.size()) { i ->
|
||||
List(transforms.size()) { i ->
|
||||
val transformConfigMap = checkNotNull(transforms.getMap(i))
|
||||
val property = transformConfigMap.getString("property")
|
||||
val type = transformConfigMap.getString("type")
|
||||
@@ -46,7 +46,7 @@ internal class TransformAnimatedNode(
|
||||
|
||||
fun collectViewUpdates(propsMap: JavaOnlyMap) {
|
||||
val transforms =
|
||||
List<JavaOnlyMap>(transformConfigs.size) { i ->
|
||||
List(transformConfigs.size) { i ->
|
||||
val transformConfig = transformConfigs[i]
|
||||
val transform =
|
||||
if (transformConfig is AnimatedTransformConfig) {
|
||||
|
||||
+1
-1
@@ -16,4 +16,4 @@ import com.facebook.proguard.annotations.DoNotStrip
|
||||
*/
|
||||
@DoNotStrip
|
||||
internal class ObjectAlreadyConsumedException @DoNotStrip constructor(detailMessage: String) :
|
||||
RuntimeException(detailMessage) {}
|
||||
RuntimeException(detailMessage)
|
||||
|
||||
+1
-4
@@ -19,10 +19,7 @@ internal class DestroyUnmountedViewMountItem(
|
||||
) : MountItem {
|
||||
|
||||
override fun execute(mountingManager: MountingManager) {
|
||||
val surfaceMountingManager = mountingManager.getSurfaceManager(_surfaceId)
|
||||
if (surfaceMountingManager == null) {
|
||||
return
|
||||
}
|
||||
val surfaceMountingManager = mountingManager.getSurfaceManager(_surfaceId) ?: return
|
||||
surfaceMountingManager.deleteView(reactTag)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -31,11 +31,11 @@ internal class DevLoadingModule(reactContext: ReactApplicationContext) :
|
||||
}
|
||||
|
||||
override fun showMessage(message: String, color: Double?, backgroundColor: Double?) {
|
||||
UiThreadUtil.runOnUiThread(Runnable { devLoadingViewManager?.showMessage(message) })
|
||||
UiThreadUtil.runOnUiThread { devLoadingViewManager?.showMessage(message) }
|
||||
}
|
||||
|
||||
override fun hide() {
|
||||
UiThreadUtil.runOnUiThread(Runnable { devLoadingViewManager?.hide() })
|
||||
UiThreadUtil.runOnUiThread { devLoadingViewManager?.hide() }
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
Reference in New Issue
Block a user