Skip to content

Commit

Permalink
chore: make null check
Browse files Browse the repository at this point in the history
  • Loading branch information
prashantsaini1 committed Dec 4, 2020
1 parent c9e4edb commit b660ad3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions android/src/av/imageview/AvImageView.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,23 +147,23 @@ public void setImageAsURL(String uri) {
options = options.error(brokenLinkImageDrawable);
options = options.timeout(timeout);

if (currentProperties.containsKey("animated") && !currentProperties.getBoolean("animated")) {
if (currentProperties.containsKeyAndNotNull("animated") && !currentProperties.getBoolean("animated")) {
options = options.dontAnimate();
}

if (currentProperties.containsKey("rounded") && currentProperties.getBoolean("rounded")) {
if (currentProperties.containsKeyAndNotNull("rounded") && currentProperties.getBoolean("rounded")) {
options = options.circleCrop();
}

if (currentProperties.containsKey("shouldCacheImagesInMemory") && !currentProperties.getBoolean("shouldCacheImagesInMemory")) {
if (currentProperties.containsKeyAndNotNull("shouldCacheImagesInMemory") && !currentProperties.getBoolean("shouldCacheImagesInMemory")) {
options = options.skipMemoryCache(true);
}

if (currentProperties.containsKey("loadingIndicator") && currentProperties.getBoolean("loadingIndicator")) {
if (currentProperties.containsKeyAndNotNull("loadingIndicator") && currentProperties.getBoolean("loadingIndicator")) {
this.progressBar.setVisibility(View.VISIBLE);
}

if (currentProperties.containsKey("signature") && !currentProperties.getString("signature").isEmpty()) {
if (currentProperties.containsKeyAndNotNull("signature") && !currentProperties.getString("signature").isEmpty()) {
signature = currentProperties.getString("signature");
}

Expand Down

0 comments on commit b660ad3

Please sign in to comment.