package com.develop.food.base.utils

import android.text.TextUtils
import android.view.View
import android.widget.TextView

fun View.setVisible() {
    if (visibility != View.VISIBLE) {
        visibility = View.VISIBLE
    }
}

fun View.setGone() {
    if (visibility != View.GONE) {
        visibility = View.GONE
    }
}

fun TextView.updateText(updated: String) {
    if (!TextUtils.equals(text.toString(), updated)) {
        text = updated
    }
}