Skip to content

Commit

Permalink
fix: make title and subtitle nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
therajanmaurya committed Sep 29, 2022
1 parent fc378fc commit 0077156
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,16 @@ class SweetUIErrorHandler(private val context: Context, private val view: View)
* @param subFeatureName Sub Feature Name
* @param featureImage Feature Image
*/
fun showSweetCustomErrorUI(featureName: String, subFeatureName: String,
fun showSweetCustomErrorUI(featureName: String?, subFeatureName: String?,
featureImage: Int?, featureLayoutUI: View, sweetErrorLayoutUI: View) {
featureLayoutUI.visibility = View.GONE
sweetErrorLayoutUI.visibility = View.VISIBLE
llErrorToLoad.visibility = View.GONE
llEmptyUI.visibility = View.GONE
llCustomUI.visibility = View.VISIBLE
ivCustomFeatureImage.setImageResource(featureImage!!)
tvCustomFeatureName.text = featureName
tvCustomSubFeatureName.text = subFeatureName
featureName?.let { tvCustomFeatureName.text = it } ?: run { tvCustomFeatureName.visibility = View.GONE }
subFeatureName?.let { tvCustomSubFeatureName.text = it } ?: run { tvCustomSubFeatureName.visibility = View.GONE }
}

/**
Expand Down

0 comments on commit 0077156

Please sign in to comment.