Skip to content

Commit

Permalink
Fix issue #1
Browse files Browse the repository at this point in the history
  • Loading branch information
appupgrade-dev committed Feb 26, 2023
1 parent e6460b1 commit 623098d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

All notable changes will be documented in this file.

## [1.0.3] - 2023-01-16
## [1.0.3] - 2023-02-26

* Fix issue [#1](https://github.com/appupgrade-dev/app-upgrade-android-sdk/issues/1).

## [1.0.2] - 2023-01-16

* Add localization support for update message.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ allprojects {
2. Add the dependency to your project
```groovy
dependencies {
implementation 'com.github.appupgrade-dev:app-upgrade-android-sdk:1.0.2'
implementation 'com.github.appupgrade-dev:app-upgrade-android-sdk:1.0.3'
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
fun showForceUpgradePopup(parentActivity: Activity, appId: String, updateMessage: String, alertDialogConfig: AlertDialogConfig?) {
Log.d("App Upgrade: ", "Show force upgrade popup.")

Thread {
if (!parentActivity.isFinishing) {
parentActivity.runOnUiThread {
val builder = AlertDialog.Builder(parentActivity)
builder.setMessage(updateMessage)
Expand All @@ -109,13 +109,15 @@
alert.setTitle(alertDialogTitle)
alert.show()
}
}.start()
} else {
Log.d("App Upgrade Err: ", "Parent activity is finished running.")
}
}

fun showUpgradePopup(parentActivity: Activity, appId: String, updateMessage: String, alertDialogConfig: AlertDialogConfig?) {
Log.d("App Upgrade: ", "Show upgrade popup.")

Thread {
if (!parentActivity.isFinishing) {
parentActivity.runOnUiThread {
val builder = AlertDialog.Builder(parentActivity)
builder.setMessage(updateMessage)
Expand Down Expand Up @@ -152,7 +154,9 @@
alert.setTitle(alertDialogTitle)
alert.show()
}
}.start()
} else {
Log.d("App Upgrade Err: ", "Parent activity is finished running.")
}
}

private fun onUserLater() {
Expand Down

0 comments on commit 623098d

Please sign in to comment.