fix: simplify boolean view logic
This is a pretty basic conversion from `if (true) View.VISIBLE else View.GONE` to `isVisible` which is exactly that, but easier to track.
This commit is contained in:
parent
e65e7a79a5
commit
9b2015f4cf
25 changed files with 107 additions and 111 deletions
|
@ -11,6 +11,7 @@ import android.webkit.WebResourceRequest
|
|||
import android.webkit.WebView
|
||||
import android.webkit.WebViewClient
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.lifecycle.LiveData
|
||||
|
@ -101,8 +102,7 @@ class ProfileFragment : Fragment() {
|
|||
}
|
||||
}
|
||||
|
||||
binding.userInfoContainer.visibility =
|
||||
if (user.about != null) View.VISIBLE else View.GONE
|
||||
binding.userInfoContainer.isVisible = user.about != null
|
||||
|
||||
|
||||
binding.statsEpisodesWatched.text = user.statistics.anime.episodesWatched.toString()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue