forked from GitHub-Mirror/riotX-android
ThrottleLast the notification drawer manager
This commit is contained in:
parent
535b41d818
commit
e90aeff417
@ -168,13 +168,20 @@ class NotificationDrawerManager @Inject constructor(private val context: Context
|
||||
|
||||
|
||||
fun refreshNotificationDrawer() {
|
||||
backgroundHandler.post {
|
||||
// Implement last throttler
|
||||
Timber.w("refreshNotificationDrawer()")
|
||||
backgroundHandler.removeCallbacksAndMessages(null)
|
||||
backgroundHandler.postDelayed(
|
||||
{
|
||||
refreshNotificationDrawerBg()
|
||||
}
|
||||
, 200)
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
private fun refreshNotificationDrawerBg() {
|
||||
Timber.w("refreshNotificationDrawerBg()")
|
||||
|
||||
val session = activeSessionHolder.getActiveSession()
|
||||
val user = session.getUser(session.sessionParams.credentials.userId)
|
||||
val myUserDisplayName = user?.displayName ?: ""
|
||||
|
Loading…
Reference in New Issue
Block a user