Simplify with code coerceAtLeast(0)`
This commit is contained in:
parent
b967c877a6
commit
fae1c0800d
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