Fix crash reported by PlayStore

This commit is contained in:
Benoit Marty 2019-07-12 16:48:35 +02:00
parent fe69206340
commit e2ea76f871
1 changed files with 2 additions and 1 deletions

View File

@ -182,7 +182,8 @@ class NotificationDrawerManager @Inject constructor(private val context: Context
private fun refreshNotificationDrawerBg() {
Timber.w("refreshNotificationDrawerBg()")
val session = activeSessionHolder.getActiveSession()
val session = activeSessionHolder.getSafeActiveSession() ?: return
val user = session.getUser(session.sessionParams.credentials.userId)
val myUserDisplayName = user?.displayName ?: session.sessionParams.credentials.userId
val myUserAvatarUrl = session.contentUrlResolver().resolveThumbnail(user?.avatarUrl, avatarSize, avatarSize, ContentUrlResolver.ThumbnailMethod.SCALE)