Fixed rare errors

This commit is contained in:
Yair Morgenstern
2020-12-02 23:17:20 +02:00
parent 1f5fa74cea
commit 2a3a0b107f
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,6 @@
package com.unciv.ui.utils
import com.badlogic.gdx.Gdx
import kotlin.concurrent.thread
//Its a popUp which will close itself after a given amount of time
@ -17,7 +18,7 @@ class ToastPopup (message: String, screen: CameraStageBaseScreen, time: Long = 1
private fun startTimer(){
thread (name = "ResponsePopup") {
Thread.sleep(visibilityTime)
this.close()
Gdx.app.postRunnable { this.close() }
}
}

View File

@ -42,6 +42,11 @@ object DropBox {
val reader = BufferedReader(InputStreamReader(errorStream))
println(reader.readText())
return null
} catch (error: Error) {
println(error.message)
val reader = BufferedReader(InputStreamReader(errorStream))
println(reader.readText())
return null
}
}
}