forked from GitHub-Mirror/riotX-android
Fix / crash not called on UI Thread
This commit is contained in:
parent
2a2431e490
commit
2eee25bbc1
@ -45,7 +45,9 @@ object PopupAlertManager {
|
|||||||
synchronized(alertFiFo) {
|
synchronized(alertFiFo) {
|
||||||
alertFiFo.add(alert)
|
alertFiFo.add(alert)
|
||||||
}
|
}
|
||||||
displayNextIfPossible()
|
weakCurrentActivity?.get()?.runOnUiThread {
|
||||||
|
displayNextIfPossible()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun cancelAlert(uid: String) {
|
fun cancelAlert(uid: String) {
|
||||||
@ -62,8 +64,10 @@ object PopupAlertManager {
|
|||||||
|
|
||||||
//it could also be the current one
|
//it could also be the current one
|
||||||
if (currentAlerter?.uid == uid) {
|
if (currentAlerter?.uid == uid) {
|
||||||
Alerter.hide()
|
weakCurrentActivity?.get()?.runOnUiThread {
|
||||||
currentIsDismissed()
|
Alerter.hide()
|
||||||
|
currentIsDismissed()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user