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() {
|
fun refreshNotificationDrawer() {
|
||||||
backgroundHandler.post {
|
// Implement last throttler
|
||||||
refreshNotificationDrawerBg()
|
Timber.w("refreshNotificationDrawer()")
|
||||||
}
|
backgroundHandler.removeCallbacksAndMessages(null)
|
||||||
|
backgroundHandler.postDelayed(
|
||||||
|
{
|
||||||
|
refreshNotificationDrawerBg()
|
||||||
|
}
|
||||||
|
, 200)
|
||||||
}
|
}
|
||||||
|
|
||||||
@WorkerThread
|
@WorkerThread
|
||||||
private fun refreshNotificationDrawerBg() {
|
private fun refreshNotificationDrawerBg() {
|
||||||
|
Timber.w("refreshNotificationDrawerBg()")
|
||||||
|
|
||||||
val session = activeSessionHolder.getActiveSession()
|
val session = activeSessionHolder.getActiveSession()
|
||||||
val user = session.getUser(session.sessionParams.credentials.userId)
|
val user = session.getUser(session.sessionParams.credentials.userId)
|
||||||
val myUserDisplayName = user?.displayName ?: ""
|
val myUserDisplayName = user?.displayName ?: ""
|
||||||
|
Loading…
Reference in New Issue
Block a user