Merge pull request #1725 from Hafizzle/Fixes#1710

Hide gold from other user profiles
This commit is contained in:
Phillip Thelen 2022-03-18 11:43:30 +01:00 committed by GitHub
commit 79ef909ecc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,9 +73,9 @@ class AvatarWithBarsViewModel(private val context: Context, private val binding:
if (!stats.isBuffed) {
binding.buffImageView.visibility = View.GONE
}
binding.currencyView.gold = stats.gp ?: 0.0
if (user is User) {
binding.currencyView.gold = stats.gp ?: 0.0
binding.currencyView.hourglasses = user.hourglassCount.toDouble()
binding.currencyView.gems = user.gemCount.toDouble()
}