Fix some compilation warnings

This commit is contained in:
Benoit Marty 2020-10-06 15:57:31 +02:00
parent 9e0ebc94c5
commit 250ac42fa3
3 changed files with 2 additions and 3 deletions

View file

@ -1074,7 +1074,7 @@ class RoomDetailViewModel @AssistedInject constructor(
.buffer(1, TimeUnit.SECONDS)
.filter { it.isNotEmpty() }
.subscribeBy(onNext = { actions ->
val bufferedMostRecentDisplayedEvent = actions.maxBy { it.event.displayIndex }?.event ?: return@subscribeBy
val bufferedMostRecentDisplayedEvent = actions.maxByOrNull { it.event.displayIndex }?.event ?: return@subscribeBy
val globalMostRecentDisplayedEvent = mostRecentDisplayedEvent
if (trackUnreadMessages.get()) {
if (globalMostRecentDisplayedEvent == null) {

View file

@ -84,7 +84,7 @@ abstract class MessagePollItem : AbsMessageItem<MessagePollItem.Holder>() {
}
} else {
holder.resultWrapper.isVisible = true
val maxCount = votes?.maxBy { it.value }?.value ?: 0
val maxCount = votes?.maxByOrNull { it.value }?.value ?: 0
optionsContent?.options?.forEachIndexed { index, item ->
if (index < resultLines.size) {
val optionCount = votes?.get(index) ?: 0

View file

@ -17,7 +17,6 @@ package im.vector.app.features.reactions
import android.os.Bundle
import android.view.View
import androidx.lifecycle.observe
import im.vector.app.R
import im.vector.app.core.extensions.cleanup
import im.vector.app.core.platform.VectorBaseFragment