mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-30 07:21:34 -04:00
Fixed rare errors
This commit is contained in:
parent
1f5fa74cea
commit
2a3a0b107f
@ -1,5 +1,6 @@
|
|||||||
package com.unciv.ui.utils
|
package com.unciv.ui.utils
|
||||||
|
|
||||||
|
import com.badlogic.gdx.Gdx
|
||||||
import kotlin.concurrent.thread
|
import kotlin.concurrent.thread
|
||||||
|
|
||||||
//Its a popUp which will close itself after a given amount of time
|
//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(){
|
private fun startTimer(){
|
||||||
thread (name = "ResponsePopup") {
|
thread (name = "ResponsePopup") {
|
||||||
Thread.sleep(visibilityTime)
|
Thread.sleep(visibilityTime)
|
||||||
this.close()
|
Gdx.app.postRunnable { this.close() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,6 +42,11 @@ object DropBox {
|
|||||||
val reader = BufferedReader(InputStreamReader(errorStream))
|
val reader = BufferedReader(InputStreamReader(errorStream))
|
||||||
println(reader.readText())
|
println(reader.readText())
|
||||||
return null
|
return null
|
||||||
|
} catch (error: Error) {
|
||||||
|
println(error.message)
|
||||||
|
val reader = BufferedReader(InputStreamReader(errorStream))
|
||||||
|
println(reader.readText())
|
||||||
|
return null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user