Skip to content

Commit

Permalink
2019-05-27 17:50
Browse files Browse the repository at this point in the history
Bug fix
  • Loading branch information
Aryan-mor authored and Aryan-mor committed May 27, 2019
1 parent 74a26d2 commit ed626c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion UtilsLibrary/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.3.4"
versionName "1.3.5"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand Down
16 changes: 8 additions & 8 deletions UtilsLibrary/src/main/java/com/aryanmo/utils/utils/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ fun Activity.delayOnUiThread(duration: Int) {
}

fun Activity.delayOnUiThread(duration: Int, runnable: () -> Unit) {
Thread(Runnable {
try {
Thread.sleep(duration.toLong())
} catch (e: InterruptedException) {
e.printStackTrace()
}
}).start()
this.runOnUiThread {
Thread(Runnable {
try {
Thread.sleep(duration.toLong())
} catch (e: InterruptedException) {
e.printStackTrace()
}
runnable()
}).start()
runnable()
}
}

Expand Down

0 comments on commit ed626c9

Please sign in to comment.