~captainepoch/husky

b37bb782980a247fd533c72f75d83908c5c4d6d5 — Adolfo Santiago 2 months ago 76b2c95
Added Boolean extension functions
1 files changed, 10 insertions(+), 0 deletions(-)

A husky/app/src/main/java/com/keylesspalace/tusky/core/extensions/BooleanExt.kt
A husky/app/src/main/java/com/keylesspalace/tusky/core/extensions/BooleanExt.kt => husky/app/src/main/java/com/keylesspalace/tusky/core/extensions/BooleanExt.kt +10 -0
@@ 0,0 1,10 @@
package com.keylesspalace.tusky.core.extensions

/**
 * Returns false if a Boolean is null.
 *
 * @return False if null, the value otherwise.
 */
fun Boolean?.orEmpty(): Boolean {
    return (this ?: false)
}