From 6f0edba2667fa9776de27ca3f88da7e7b078188f Mon Sep 17 00:00:00 2001 From: hublot Date: Thu, 18 May 2023 23:53:36 +0800 Subject: [PATCH] Revert "feat: extend disable transformation property" This reverts commit 2cc218a23f959eaa44d298fb836a6c1fee7c646b. --- .../com/dylanvann/fastimage/FastImageViewManager.java | 5 ----- .../com/dylanvann/fastimage/FastImageViewWithUrl.java | 10 ---------- src/index.tsx | 8 +------- 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/android/src/main/java/com/dylanvann/fastimage/FastImageViewManager.java b/android/src/main/java/com/dylanvann/fastimage/FastImageViewManager.java index df739994d..c7a795471 100644 --- a/android/src/main/java/com/dylanvann/fastimage/FastImageViewManager.java +++ b/android/src/main/java/com/dylanvann/fastimage/FastImageViewManager.java @@ -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( diff --git a/android/src/main/java/com/dylanvann/fastimage/FastImageViewWithUrl.java b/android/src/main/java/com/dylanvann/fastimage/FastImageViewWithUrl.java index 55152ee51..cc69fce8c 100644 --- a/android/src/main/java/com/dylanvann/fastimage/FastImageViewWithUrl.java +++ b/android/src/main/java/com/dylanvann/fastimage/FastImageViewWithUrl.java @@ -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; @@ -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; @@ -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)); diff --git a/src/index.tsx b/src/index.tsx index 891c0975a..bf37b3547 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -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.