Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

Commit

Permalink
Fix for crashes on older versions of Android
Browse files Browse the repository at this point in the history
  • Loading branch information
fruzyna committed Aug 8, 2020
1 parent 2389fd1 commit 196ea61
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ class MainActivity : AppCompatActivity() {
var latest = ""
if (isConnected()) {
// download releases page
loading.setMessage("Querying latest app version...")
runOnUiThread {
loading.setMessage("Querying latest app version...")
}
val relURL = URL("https://github.com/mail929/LiamRank/releases/latest")
val relStr = "/mail929/LiamRank/releases/tag/"
val relStream = DataInputStream(relURL.openStream())
Expand All @@ -196,7 +198,9 @@ class MainActivity : AppCompatActivity() {
// check if already downloaded, or there is an update
else if (isConnected() && (!File(appDir, "LiamRank-$installed").exists() || (latest.isNotEmpty() && (installed != latest)))) {
println("Fetching repo")
loading.setMessage("Fetching release: ${latest}...")
runOnUiThread {
loading.setMessage("Fetching release: ${latest}...")
}
try {
// download zip
val zipURL = URL("https://github.com/mail929/LiamRank/archive/${latest}.zip")
Expand Down

0 comments on commit 196ea61

Please sign in to comment.