Skip to content

Commit

Permalink
fix(android): ensure a hierarchy is set for the default “stretch” pro…
Browse files Browse the repository at this point in the history
…perty value
  • Loading branch information
farfromrefug committed Jan 27, 2021
1 parent c767cd8 commit c66f8d5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/image.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@ export const needRequestImage = function (target: any, propertyKey: string | Sym
descriptor.value = function (...args: any[]) {
if (!this._canRequestImage) {
this._needRequestImage = true;
// we need to ensure a hierarchy is set or the default aspect ratio wont be set
// because aspectFit is the default (wanted) but then we wont go into stretchProperty.setNative
this._needUpdateHierarchy = true;
return;
}
return originalMethod.apply(this, args);
Expand Down

0 comments on commit c66f8d5

Please sign in to comment.