Skip to content

Commit

Permalink
Merge pull request #270 from vitorma/master
Browse files Browse the repository at this point in the history
bugfix notchHeight(). Previous cast never succeeds
  • Loading branch information
kpmmmurphy authored Aug 9, 2021
2 parents 86ed4ef + 697c46e commit 53330d5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Change Log
All notable changes to this project will be documented in this file.

## 7.2.2 - 09/08/2021
* bugfix notchHeight() cast

## 7.2.1 - 27/07/2021
* Fixed alert may has extra bottom margin when displayed with Gravity.BOTTOM

Expand Down
2 changes: 1 addition & 1 deletion alerter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ apply from: rootProject.file('quality.gradle')

final String GROUP_ID = "com.tapadoo.android"

final String VERSION = "7.2.1"
final String VERSION = "7.2.2"

final String DESCRIPTION = "An Android Alerting Library"
final String GITHUB_URL = "https://github.com/Tapadoo/Alerter"
Expand Down
2 changes: 1 addition & 1 deletion alerter/src/main/java/com/tapadoo/alerter/utils/ExAlert.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import com.tapadoo.alerter.R
fun Alert.getDimenPixelSize(@DimenRes id: Int) = resources.getDimensionPixelSize(id)

@RequiresApi(Build.VERSION_CODES.P)
fun Alert.notchHeight() = (context as? Activity)?.window?.decorView?.rootWindowInsets?.displayCutout?.safeInsetTop
fun Alert.notchHeight() = rootWindowInsets?.displayCutout?.safeInsetTop
?: 0

fun Context.getRippleDrawable(): Drawable? {
Expand Down

0 comments on commit 53330d5

Please sign in to comment.