Skip to content

Commit

Permalink
Merge pull request #18 from Trendyol/bugfix/contentimagevisibility
Browse files Browse the repository at this point in the history
Fix content image visibility bug
  • Loading branch information
MertNYuksel authored Jan 3, 2020
2 parents 2a77307 + 16cf8dc commit 7a8784d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ open class InfoDialogBuilder internal constructor() : Builder() {

var content: CharSequence = SpannableString("")
@DrawableRes
var contentImage: Int = 0
var contentImage: Int? = null
var showContentAsHtml: Boolean = false

internal fun buildInfoDialog(block: InfoDialogBuilder.() -> Unit): DialogFragment {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ data class DialogViewState(

fun isContentVisible(): Boolean = content.isNotEmpty()

fun isContentImageVisible(): Boolean = contentImage != null
fun isContentImageVisible(): Boolean = contentImage?.takeIf { it != 0 } != null
}

0 comments on commit 7a8784d

Please sign in to comment.