Return null instead of return@launch
Co-authored-by: Benoit Marty <benoit.marty@gmail.com>
This commit is contained in:
+1
-1
@@ -228,7 +228,7 @@ class TimelinePresenter(
|
||||
TimelineEvent.MarkAllAsRead -> sessionCoroutineScope.launch {
|
||||
val latestEventId = room.liveTimeline.getLatestEventId().getOrElse {
|
||||
Timber.tag(tag).w(it, "Failed to get latest event id to mark as fully read")
|
||||
return@launch
|
||||
null
|
||||
} ?: return@launch
|
||||
markAsFullyRead(room.roomId, latestEventId)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user