Simplify with code coerceAtLeast(0)`

This commit is contained in:
Benoit Marty
2025-01-23 14:57:05 +01:00
parent b967c877a6
commit fae1c0800d

View File

@@ -206,8 +206,6 @@ class MediaViewerPresenter @AssistedInject constructor(
}
return data.indexOfFirst {
(it as? MediaViewerPageData.MediaViewerData)?.eventId == eventId
}
.takeIf { it != -1 }
?: 0
}.coerceAtLeast(0)
}
}