mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-22 05:41:11 +07:00
Fixed rare errors
This commit is contained in:
@ -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() }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user