Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "feat: extend disable transformation property" #7

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ public void setSource(FastImageViewWithUrl view, @Nullable ReadableMap source) {
view.setSource(source);
}

@ReactProp(name = "disableTransformation")
public void setDisableTransformation(FastImageViewWithUrl view, @Nullable Boolean disableTransformation) {
view.disableTransformation(disableTransformation);
}

@ReactProp(name = "defaultSource")
public void setDefaultSource(FastImageViewWithUrl view, @Nullable String source) {
view.setDefaultSource(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class FastImageViewWithUrl extends AppCompatImageView {
private boolean mNeedsReload = false;
private ReadableMap mSource = null;
private Drawable mDefaultSource = null;
private boolean mDisableTransformation = false;

public GlideUrl glideUrl;

Expand All @@ -47,11 +46,6 @@ public void setSource(@Nullable ReadableMap source) {
mSource = source;
}

public void disableTransformation(@Nullable boolean disableTransform) {
mNeedsReload = true;
mDisableTransformation = disableTransform;
}

public void setDefaultSource(@Nullable Drawable source) {
mNeedsReload = true;
mDefaultSource = source;
Expand Down Expand Up @@ -154,10 +148,6 @@ public void onAfterUpdate(
.placeholder(mDefaultSource) // show until loaded
.fallback(mDefaultSource)); // null will not be treated as error

if (mDisableTransformation) {
builder = builder.dontTransform();
}

if (key != null)
builder.listener(new FastImageRequestListener(key));

Expand Down
8 changes: 1 addition & 7 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,8 @@ export interface FastImageProps extends AccessibilityProps, ViewProps {
*
* If supplied, changes the color of all the non-transparent pixels to the given color.
*/
tintColor?: ColorValue

/**
* If supplied, the original size of the resource without any transformations will be displayed.
*
* @platform android
*/
disableTransformation?: boolean
tintColor?: ColorValue

/**
* A unique identifier for this element to be used in UI Automation testing scripts.
Expand Down