Added 250ms delay to notification update
This commit is contained in:
@@ -1006,8 +1006,11 @@ class BaresipService: Service() {
|
|||||||
else
|
else
|
||||||
contentView.setViewVisibility(R.id.etc, View.INVISIBLE)
|
contentView.setViewVisibility(R.id.etc, View.INVISIBLE)
|
||||||
snb.setContent(contentView)
|
snb.setContent(contentView)
|
||||||
|
// Don't know why, but without the delay the notification is not always updated
|
||||||
|
Timer().schedule(250) {
|
||||||
nm.notify(STATUS_NOTIFICATION_ID, snb.build())
|
nm.notify(STATUS_NOTIFICATION_ID, snb.build())
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun getActionText(@StringRes stringRes: Int, @ColorRes colorRes: Int): Spannable {
|
private fun getActionText(@StringRes stringRes: Int, @ColorRes colorRes: Int): Spannable {
|
||||||
val spannable: Spannable = SpannableString(applicationContext.getText(stringRes))
|
val spannable: Spannable = SpannableString(applicationContext.getText(stringRes))
|
||||||
|
|||||||
Reference in New Issue
Block a user