We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c56101d commit 2bd2cbfCopy full SHA for 2bd2cbf
vector/src/main/java/im/vector/app/features/notifications/RoomGroupMessageCreator.kt
@@ -160,12 +160,10 @@ class RoomGroupMessageCreator @Inject constructor(
160
}
161
162
private fun getRoomBitmap(events: List<NotifiableMessageEvent>): Bitmap? {
163
- if (events.isEmpty()) return null
164
-
165
// Use the last event (most recent?)
166
- val roomAvatarPath = events.last().roomAvatarPath
167
168
- return bitmapLoader.getRoomBitmap(roomAvatarPath)
+ return events.lastOrNull()
+ ?.roomAvatarPath
+ ?.let { bitmapLoader.getRoomBitmap(it) }
169
170
171
0 commit comments