feat: format project and change in test example default component (#2350)

# Summary
Format the whole project.
This commit is contained in:
Bohdan Artiukhov
2024-07-18 12:45:36 +02:00
committed by GitHub
parent 74445cc0fd
commit 2b6ced416b
7 changed files with 30 additions and 24 deletions

View File

@@ -35,7 +35,6 @@ import com.facebook.react.uimanager.events.EventDispatcher;
import com.facebook.react.views.imagehelper.ImageSource;
import com.facebook.react.views.imagehelper.ResourceDrawableIdHelper;
import com.horcrux.svg.events.SvgLoadEvent;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
@@ -143,7 +142,8 @@ class ImageView extends RenderableView {
public void onNewResultImpl(Bitmap bitmap) {
final EventDispatcher mEventDispatcher =
UIManagerHelper.getEventDispatcherForReactTag(mContext, getId());
mEventDispatcher.dispatchEvent(new SvgLoadEvent(
mEventDispatcher.dispatchEvent(
new SvgLoadEvent(
UIManagerHelper.getSurfaceId(ImageView.this),
getId(),
mContext,

View File

@@ -395,7 +395,7 @@ public abstract class RenderableView extends VirtualView implements ReactHitSlop
Paint luminancePaint = new Paint();
ColorMatrix luminanceToAlpha =
new ColorMatrix(
new float[]{
new float[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2125f, 0.7154f, 0.0721f, 0, 0
});
luminancePaint.setColorFilter(new ColorMatrixColorFilter(luminanceToAlpha));

View File

@@ -14,10 +14,16 @@ public class SvgLoadEvent extends Event<SvgLoadEvent> {
private final float height;
private final String uri;
public SvgLoadEvent(int surfaceId, int viewId, ReactContext mContext, String uriString, float width, float height) {
public SvgLoadEvent(
int surfaceId,
int viewId,
ReactContext mContext,
String uriString,
float width,
float height) {
super(surfaceId, viewId);
ImageSource imageSource = new ImageSource(mContext, uriString);
this.uri = imageSource.getSource();;
this.uri = imageSource.getSource();
this.width = width;
this.height = height;
}

View File

@@ -24,5 +24,5 @@ import Test2276 from './src/Test2276';
import Test2327 from './src/Test2327';
export default function App() {
return <Test1790 />;
return <ColorTest />;
}

View File

@@ -12,9 +12,9 @@
#include <react/renderer/imagemanager/primitives.h>
#ifdef ANDROID
#include <folly/dynamic.h>
#include <react/renderer/mapbuffer/MapBuffer.h>
#include <react/renderer/mapbuffer/MapBufferBuilder.h>
#include <folly/dynamic.h>
#endif
namespace facebook {

View File

@@ -7,7 +7,7 @@ import React from 'react';
import App from '../App';
// Note: import explicitly to use the types shipped with jest.
import {it} from '@jest/globals';
import { it } from '@jest/globals';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';

View File

@@ -7,7 +7,7 @@ import React from 'react';
import App from '../App';
// Note: import explicitly to use the types shipped with jest.
import {it} from '@jest/globals';
import { it } from '@jest/globals';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';