Add Bundle extensions

This commit is contained in:
vfsfitvnm
2022-06-29 22:38:00 +02:00
parent e4209d18ad
commit 58f821534e
4 changed files with 30 additions and 7 deletions

View File

@@ -0,0 +1,11 @@
package it.vfsfitvnm.vimusic.utils
import android.os.Bundle
fun Bundle.getFloatOrNull(key: String): Float? =
if (containsKey(key)) getFloat(key) else null
fun Bundle.getLongOrNull(key: String): Long? =
if (containsKey(key)) getLong(key) else null