Simplify with code coerceAtLeast(0)`
This commit is contained in:
parent
dff9005a70
commit
54182b0d8e
1 changed files with 1 additions and 3 deletions
|
|
@ -206,8 +206,6 @@ class MediaViewerPresenter @AssistedInject constructor(
|
|||
}
|
||||
return data.indexOfFirst {
|
||||
(it as? MediaViewerPageData.MediaViewerData)?.eventId == eventId
|
||||
}
|
||||
.takeIf { it != -1 }
|
||||
?: 0
|
||||
}.coerceAtLeast(0)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue