Skip to content

Commit

Permalink
Release version 1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
skydoves committed Sep 17, 2019
1 parent d486822 commit 68a2e19
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
Add a dependency code to your **module**'s `build.gradle` file.
```gradle
dependencies {
implementation "com.github.skydoves:whatif:1.0.3"
implementation "com.github.skydoves:whatif:1.0.4"
}
```

Expand Down Expand Up @@ -148,6 +148,22 @@ val length = nullableString?.whatIfLet(
}
```

### WhatIfHasExtras
An expression for invoking `whatIf` lambda when the Activity's intent extras is not null and not empty.
```kotlin
var foo: String? = null
this@MainActivity.whatIfHasExtras {
foo = "${it.getString("foo")}"
}
```
And we can handle the null case.<br>
```kotlin
this@MainActivity.whatIfHasExtras(
whatIf = { foo = "${it.getString("foo")}" },
whatIfNot = { log("intent extras is null or empty.") }
)
```

## Find this library useful? :heart:
Support it by joining __[stargazers](https://github.com/skydoves/whatif/stargazers)__ for this repository. :star: <br>
And __[follow](https://github.com/skydoves)__ me for my next creations! 🤩
Expand Down
4 changes: 2 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ext.versions = [
minSdkLib : 15,
minSdkDemo : 16,
compileSdk : 29,
versionCode : 4,
versionName : '1.0.3',
versionCode : 5,
versionName : '1.0.4',

gradleBuildTool : '3.5.0',
spotlessGradle : '3.24.2',
Expand Down

0 comments on commit 68a2e19

Please sign in to comment.